Treehouse: Grow your CSS skills. Land your dream job.

Wrapper Problems

  • # April 25, 2011 at 3:05 pm

    Hi guys,

    I have a wrapper that contains two divs. One is floated left and the other is also floated left with margin left to give a two column layout.

    Something I have noticed is that whenever I do this kind of layout and the divs inside the wrapper are floated left or right, the wrapper div doesn’t inherit their height. I have tried height auto and it didn’t work.

    Heres a live the example.

    The wrapper div has a red border to see what is happening. If I get rid of the floats the red border expands around the two divs.

    What am I doing wrong ?


    # April 25, 2011 at 3:19 pm
    overflow: hidden;
    # April 25, 2011 at 3:20 pm

    Thanks Chris! Just figured it out as you sent that!

    # April 25, 2011 at 3:22 pm

    You’re Welcome :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.