SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    right aligned image, text wrap arround problem

    Hi,

    I'm trying to get an image right aligned, while having the text (left-aligned) wrap around the bottom of the image if the text content is longer. I'm using this:

    .rightImage {
    float:right;
    clear:right;
    padding: 0;
    margin-left: 15px;
    }

    And it works fine, but the problem is my image is pretty long. And it's not pushing the height of the parent div/container to that height. The text is determining the height of the parent container, which is very short at the moment. I need it so that whatever is taller (image or text) will push the parent container's height to the same height. How in the hay is this done? I've been trying all night long!

    Thanks,
    Matt

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Clear the floats for FF OP NS and check IE for haslayout

  3. #3
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey nice fast reply!

    Well, sorry for sounding silly but, what do you mean? How?

  4. #4
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am doing clear:right. Is that not what you mean?

  5. #5
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it! I added a br tag with clear:both after everything in the container! Whahoo! Thanks!

  6. #6
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Try on wrapper
    overflow:hidden; FF
    min-height:1%; IE 7
    and * html .yourwrapper{height:1%;} IE 6

  7. #7
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i usually will just throw in a <div class="clear"></div> and have .clear {clear:both;}. may not be the best way, but it works.
    Steve Davis


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
  •