A safer Holly Hack for IE7+

#elementNeedingHasLayout {zoom:1}

Why this over the original Holly Hack?

  • “* html” won’t select elements in IE7 in Standards Mode, so all the HH’s now in use will drop away, but the bugs they were used to fix may not.
  • If the IE/win team should fix height (broken since v5.0), the HH’s use of height:1% (or any explicit value) could wreck many layouts. Setting zoom allows us to leave height as “auto”.
  • “zoom” is likely too vaguely named to be a property in a future W3C CSS recommendation, so even without conditional comments, zoom:1 is invalid, but harmless.

One thought on “A safer Holly Hack for IE7+

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.