border="1"
for clarity
div
box (here styled with yellow background
and a border for clarity)
The browser should treat the declared width as suggested minimum width, and since it is not sufficient here, it that width should effectively be ignored. (This is what IE 7 does, too, so this is not the problem.)
The box inside the cell has no declared width, so the initial
value of width: auto
applies. Thus, the box should have
the same width as its container box, the cell, minus padding and border.
This is the box used for testing. Supercalifragilisticexpialidocious. |
<!---->
at the start of the document),
the bug does not appear the same way, since the background and the border
appear as if the box were the same width as the container cell.
However, the text still line wraps as if the width were 100px!
IE 7 first tentatively sets the cell width to 100px and the box width
to the same value, minus padding and border. It then formats the box
content and observes the long word, which is too long for that width.
It expands the cell to accommodate the long word. However, it forgets to
expand the div
box accordingly and to reformat its content.