Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    How do you display paragraph text aligned near under and over an image like you see in the newspapaers? For exapmle when I write text1 then I insert image1, and then the text2, after displaying text1, under it comes image1, with all sides empty, and under image1, it writes text2...How do you make text1 and or text2 also display at the sides of the picture so it appears nice like text wrapping the image? For example look at the news I just came across,

    http://news.yahoo.com/s/afp/2008060...ainsportoffbeat

    or say

    http://www.nature.com/news/2008/080...s.2008.878.html

    how the news text wraps around the pictures...How do you do that?

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    That is what the CSS property [minicode]float[/minicode] is all about. Basically, you can give your img tag a class:
    Code:
    <img class="news" src="..." alt="..." />
    Then, in a separate CSS file, you can apply:
    Code:
    img.news
    {
        float: left; /* Or right for floating to the right. */
    }
    Setting float to left will make it so that subsequent text will wrap around the image to the right (so the image will be `floating' to the left of the text.

    More on the float property in the CSS technical report and at w3schools with examples.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com