#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.
Thank you Steve,
this solved one of my problems with IE7 where I had used the Holly Hack previously.