Monday, December 24th, 2007

Infamous IE hasLayout is toast

Category: CSS, IE

<>p>We are slowly finding more and more out about how nice IE8 is going to play. Markus Mielke
came 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.

Read more on hasLayout.

Related Content:

Posted by Dion Almaer at 6:57 am
4 Comments

+++--
3.9 rating from 20 votes

4 Comments »

Comments feed TrackBack URI

It’s a Christmas miracle!

Comment by Matt — December 24, 2007

Too right!

Comment by botterlei — December 24, 2007

Rofl, yeah!

Comment by Daniel Skinner — December 24, 2007

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.

Comment by Morgan Roderick — December 24, 2007

Leave a comment

You must be logged in to post a comment.