IE 7 bug: declared width for table cell wrongly affects inner block


Correct behavior

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.

The test

This is the box used for testing.



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.

Jukka “Yucca” Korpela