September 27, 2007

hasLayout, ms ie-bugs

On having layout — the concept of hasLayout in IE/Win
A lot of Internet Explorer's rendering inconsistencies can be fixed by giving an element “layout.”
....
“dimensional bugs” ... can often be solved by applying a width or height.
....

The hasLayout problem affects designers (and coders) at
all experience levels. Layout has unusual and hard to predict effects
on the display of boxes, as well as implications for their descendant
elements.

Consequences of an element having, or not having “layout” can include:
  • Many common IE float bugs.
  • Boxes themselves treating basic properties differently.
  • Margin collapsing between a container and its descendants.
  • Various problems with the construction of lists.
  • Differences in the positioning of background images.
  • Differences between browsers when using scripting.

No comments: