Friday, 18 September 2009

CSS: Z-Index and getting around IE6 lack of support for this property

This is an interesting post to get around IE's bug when applying z-index to elements.

http://www.macridesweb.com/oltest/IframeShim.html

The idea is to wrap an Iframe around your element where z-index is required.

For transparency apply the alpha filter to make the actual iframe transparent. Even though its transparent, it will still hide IE's window elements e.g. select boxes away from view.

iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';

No comments: