Simply applying ‘hasLayout’

March 5, 2006

If you need to apply the hasLayout property to an element in Internet Explorer but don''t want to add height or another potentially damaging CSS property, use the proprietry zoom:1;. It is an IE only CSS property and sets the hasLayout flag to true while adding nothing visually or semantically to the element. Saved my skin more times than I care to remember.