7

I have a wrapper div with a min-height set. Position is relative and display is block. I have two column divs floated left and set to inherit min-height.

When I have lengthy content the background color of #wrapper never extends to match the content in the column divs.

Page is here: http://youngimaginations.dreamhosters.com/index.php

CSS is here: http://youngimaginations.dreamhosters.com/yi.css

Can someone point out the error of my ways?

jerrygarciuh
  • 21,158
  • 26
  • 82
  • 139

2 Answers2

25

overflow: auto will do the trick

or a <div style='clear: both'> after the floated elements.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
9

The proper fix is called "clearfix".

Read about it here, you'll never look back.

pixeline
  • 17,669
  • 12
  • 84
  • 109