How To/webdev/

Enable display:inline-block in Internet Explorer 6

By default IE6 supports inline-block css property but only on inline elements. To make block element displayed as inline-block you have to change its display property to inline and enable hasLayout property.

hasLayout is magic property in IE and you only have to know that it can be enabled by uzing zoom:1 property. For other browsers use inline-block. For older firefox versions (below v3) use display:-moz-inline-box.

Example code for display:inline-block


Star sign before display in the last rule is required to hide this style from all browser except for IE6.