SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Article CSS

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article CSS

    Hi all,

    I've to design a page with a picture and on the right side a middle vertical aligned text.

    Everything is ok with a css that align vertically the image, but if in the text i put a <br /> to go one line down, the next line goes under the image, and not under the previous line.

    How can I do ? basically I've to put 2 lines of text on the right side of a picture, aligned vertically in the middle of the image... is it possible without using of table of course ? :P

    Tnx a lot

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    up

  3. #3
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post either a link to your page or the code you are using?

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sure

    Code:
    <div>
    <img src="image.gif" style="margin: 8px; vertical-align: middle;">
    <em>first line</em><br />
    second line
    </div>
    The second line goes under the image

    Tnx

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    up


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •