SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    perfect = good enough peach's Avatar
    Join Date
    Jun 2004
    Location
    -Netherlands-
    Posts
    1,383
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Parent div ignoring height of child div when floated

    I know, this is a known issue, but I have can't find a fix anywhere.

    I have a 2 column layout and the content in the left column is often taller then the content in the right column. Since the content in the left column is floated, the container div ingnores its height and inherits the height of the right column. This causes the colored borders of the container div to run through the left column rather than around it.

    how do I fix this?

    thanx,
    JR

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either:

    a) Float the container DIV
    b) Add a clearing element after the left column in the markup
    c) Clear it without structural markup


  3. #3
    perfect = good enough peach's Avatar
    Join Date
    Jun 2004
    Location
    -Netherlands-
    Posts
    1,383
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Either:

    a) Float the container DIV
    b) Add a clearing element after the left column in the markup
    c) Clear it without structural markup



    wel C looks like something I can use. Long read though :/

    on second thought, method C is even messier than B and it might cause forward compatibility issues with ie.

    thanx
    Last edited by peach; Jun 14, 2005 at 12:20.

  4. #4
    perfect = good enough peach's Avatar
    Join Date
    Jun 2004
    Location
    -Netherlands-
    Posts
    1,383
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW, I went to Peterborough 2 times

    ...student exchange thing.

    Quote Originally Posted by Buddy Bradley
    Either:

    a) Float the container DIV
    b) Add a clearing element after the left column in the markup
    c) Clear it without structural markup



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
  •