...when the divs are being floated.
Say I've got in the stylesheet:
.container
{
width:600px;
margin-left:auto;
margin-right:auto;
background-color:#fff;
}
.column1
{
width:200px;
float:left;
}
.column2
{
width:350px;
float:left;
}
and my page looks like this:
<div class="container">
<div class="column1">Hi, I'm in column one.</div>
<div class="column2">Hi, I'm in column two.</div>
</div>
If I remove the floats, it stretches fine, but then column 2 doesn't line up beside column 1.
How do you get the container class's background colour to stretch to the height of the tallest column WITHOUT physically setting the height? (Because the column will stretch dependent on the amount of content)


It works because that break is clearing all other floats, i.e. it'll be underneath it. And as it's still in the container div, it's wrapped inside there. BINGO!