Continued fruits of the WaSP partnership: The “HasLayout” myth debunked

Based on some discussion in the Microsoft-WaSP task force, I wanted to explain a little more of the internal workings of IE to help web developers with their daily IE work. In this installment, you will find an article up on MSDN (as part of the ongoing “Exploring Internet Explorer” series) about the implications of an element having a “layout”. There are several bugs in IE that can be worked around by forcing “a layout” (an IE internal data structure) on an element. The most famous workaround is the Holly hack. Most developers are not aware of the implications of these “fixes” and this document will hopefully bring some light into this topic.

This document explains:

  • What is “HasLayout” and why is it important?
  • Which elements always have a layout?
  • Which elements can get a layout?
  • Examples of layout “Hacks”
  • Scenarios demonstrating the implications of “HasLayout”

I would especially like to thank Molly Holzschlag for getting me in touch with Dean Edwards, Holly Bergevin, Ingo Chao, Bruno Fassino, John Gallant, Georg Sørtun, and Philippe Wittenbergh. Their review, discussion and feedback were very valuable in putting this document together.

 - Markus Mielke

Comments (20)

  1. Anonymous says:

    In conjunction with WaSP members (like Dean Edwards and others) and other experts, Markus Mielke created…

  2. Anonymous says:

    Great you finally release such information yourselves!

    But "Ideally, all these issues should be fixed, if not in IE 7, then in future versions." – you cannot guarantee they’re all gone in IE7, I suppose, but is it in any way likely they are?

    And btw., I think there’s a few minor mistakes in the scenarios:

    – a closing div tag too many in the first one

    – an iv start tag in the third one

  3. Anonymous says:

    The child <div> tag in Scenario 3 example is misspelled as <iv>.

    May be you shoud correct it.

  4. Anonymous says:

    What myth is being debunked?

    To debunk a myth means to show that a commonly held misconception is wrong.

  5. Anonymous says:

    Fab guys. Simply fab! 🙂

  6. Anonymous says:

    I think it’s great that these are acknowledged, and while admitting mistakes is great, when will they be FIXED?

  7. Anonymous says:

    Is some work being done on that in IE7? Having bug well-documented is a bit helpful, but nowhere nearly as helpful as not having bug at all.

    Floating list of padded links are buggy in IE with and without ‘layout’…

  8. Anonymous says:

    Well done Markus and all involved. It’s very exciting to see progress being made. Here’s to keeping the good fruit growing!

  9. Anonymous says:

    Wonderful! Thank you, WaSP and Markus.

    I think I have found a mistake, though:

    > Which elements can get a Layout?

    > * Elements that have a value other than "auto" specified for the "overflow" property

    I think this should be ‘other than "visible"’.

  10. ieblog says:


    Thanks. We’ve fixed that. It should show up on the site soon.

    – Al Billings [MSFT]

  11. Anonymous says:

    @Jesse You will see fixes in IE7 (as Chris pointed out in his blog we are working on the top pain points and layout related ones are defintely on the list). Will you see everything fixed? Probably not but we are honestly trying.

    — Markus

  12. Anonymous says:

    These development will be helpful in precise design logic.

    Also, in another area…

    TWO feature that would really be interesting to have (if possible) are:

    –> The ability to add "background images" to the Scrollbar – CSS Tag eg:


    –> The ability to set a FLASH as a background image eg:


    And please don’t forget to add more


  13. Anonymous says:

    You say that HasLayout is important yet you also say it causes multiple bugs?

    Come again?

  14. Anonymous says:

    > TWO feature that would really be interesting to have (if possible) are:

    > –> The ability to add "background images" to the Scrollbar – CSS Tag eg:


    > –> The ability to set a FLASH as a background image eg: background=flash.swf

    How about they fully implemented and debugged the standards before allowing such nonstandard retarded constructs?

  15. Anonymous says:

    @Ron: the reason haslayout is important because it is the reason I’ve spend many late nights trying to get sites to work in IE x_x.

  16. Anonymous says:

    In strict mode, the block element with relative position will not be scrolled. I have an example in

    would this be changed in IE7

  17. Anonymous says:

    Just fix your layout engine, and stop requiring us to fix things for you by doing all these stupid workarounds on our site.

    Just support the block model correctly, and do not release IE7 until you do so.

  18. Anonymous says:

    By my calendar it’s now late-2005. How long have we all been wrestling with CSS issues in IE? A long time! Nice of MS to finally get around to providing us with some new insight on this ancient browser’s rendering process. Where have you guys been for the past five years??!?! Seriously!

    Yet another argument for Firefox and other open source browsers.

Skip to main content