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?

Tim Cooper
  • 151,519
  • 37
  • 317
  • 271
jerrygarciuh
  • 19,716
  • 25
  • 81
  • 130

2 Answers2

25

overflow: auto will do the trick

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

Pekka
  • 431,103
  • 135
  • 960
  • 1,075
9

The proper fix is called "clearfix".

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

pixeline
  • 17,430
  • 11
  • 80
  • 108