Monday, December 24th, 2007
Infamous IE hasLayout is toast
<>p>We are slowly finding more and more out about how nice IE8 is going to play. Markus Mielkecame out to tell us that hasLayout is a goner:
I do not think I am disclosing too much by saying that HasLayout will be history with IE8 (it was an internal data-structure to begin with and should have never been exposed). See http://msdn2.microsoft.com/en-us/library/bb250481.aspx for more details.
So what does “having a Layout” mean?
- In short, having a layout means that an element is responsible for sizing and
positioning itself and possibly any child elements. (If a child element has its
own layout, it sizes itself and its descendents, but the original layout
positions the child.) -
Some elements have a “fixed” size or otherwise have special sizing constraints.
They always have layout—for example, buttons, images, inputs, selects, and
marquee elements have always a native size even if width and height are not
specified. -
Sometimes elements that do not normally require layout information, like a div
or a span, may have properties specified that force a layout to be
applied in order to support the property—for example, the element must
have a layout in order to get scrollbars. -
Once a layout is applied the “hasLayout” flag is set. This property returns
true if queried.
Related Content:











It’s a Christmas miracle!
Too right!
Rofl, yeah!
http://www.satzansatz.de/cssd/onhavinglayout.html
Possibly the best read “on having layout” … I go back to it from time to time, when I can’t get my head around some IE bug.