23 Apr 2009 @ 6:37 PM

Hello

As you well know Internet Explorer 6 and lower doesnt recognize position:fixed in CSS, in order to get around that issue we need to do this. Btw everything goes in the same css file, the * html star is a hack for IE6 so only it seems the code so other browsers arent affected.

/* ===== Normal CSS for all other browsers ====== */
.fixed { position: fixed;}

/* ==== IE Specific CSS ==== */
* html { height: 100%; width: 100%; overflow: hidden;}
* html body { height: 100%; width: 100%; overflow: auto;}
* html .fixed { position: absolute;}

Please note that this means that future absoltute positioned elements will probably break so a safer bet is either to use javascript or just plain use position fixed and suck it up, IE6 is going to die pretty soon anyways

Questions in Comments

Posted By: Dinulescu Alexandru Adrian

Last Edit: 26 Jan 2010 @ 03:21 PM

EmailPermalink

Responses to this post » (One Total)

[...] position: fixed; native, however we have a small trick to do position: fixed; in IE6 found here. You can combine them if you [...]

You must be logged in to post a comment.