float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float float
box with assigned height, box with assigned height, box with assigned height, box with assigned height, box with assigned height

In Internet Explorer 7 the height of a box is (correctly) always respected. So the above blue box doesn't stretch to enclose its floated green child (this happened in IE6/Win.)

But now there is another problem: any box following the one with assigned height interacts wrongly with the float protruding out of the blue box. The content of the red boxes above either overlaps or is overlapped by the float (probably depending on hasLayout, true for the first red box, false for the second one.) This is not correct: Content inside these following boxes should shorten its width avoiding any overlap with the float. Background/border of such boxes should go below (be overlapped by) the float.

The problem occurs even if the subsequent box has clear:both, indeed adding clear:both to the above test doesn't change anything. This is even more wrong, since the box with clear should have a (sort of) top margin so to start after the float.

A similar problem occurs when the blue box has an assigned max-height instead of height.

CSS tests home