View Full Version : HTML5 position fixed in IE8

11-08-2011, 04:18 PM
Hi sirs,

Well how do you fix a position:fixed in IE8? my document type is an HTML5..

I tried everything...

Well what I was trying to do is to keep my navigation bar on top of the browser window.. when I scroll down..

I currently using jQuery to do this... when i scroll a certain height, I addClass to the navigation list.. and make it "fixed"

her's the style I am using to make the the navigation stick to the top

.fixed{position:fixed; top:0;}

everything works well on all modern browser.. except for IE versions < 9 I haven't checked on IE9.. but I have faith on that browser to support that style..


11-08-2011, 04:31 PM
Are you using html specific tags? such as <nav>?

11-08-2011, 04:35 PM
Hello jhaycutexp,
IE8 will recognize position: fixed; just fine. It won't recognize some HTML5 elements without some help though, maybe that's the issue instead.

See HTML5shiv here (http://remysharp.com/2009/01/07/html5-enabling-script/).

11-09-2011, 02:29 PM
Hi brothers..

Nope I am not using any html5 tags at the moment... just the basic..

here's the test page so you can check..

what I am trying to fix..

I am using only the html5 video.. that's why it should be on html5 document type..

It looks okay on most recent browsers.. firefox, chrome, safari.. but on IE8.. the position fixed is not being attached... when i scroll down..

look at it on other browser so you can see how it works.. it looks crap on ie8 right now.. cause i stopped working on it yesterday cause i was so pissed >__<

but its only a minor fix on the css and it will look the same as the others..

please help :)

11-09-2011, 04:18 PM
When I view your site in a browser that is not recognizing the position: fixed; the source code does not show the .fixed. Not sure yet why...

Try making .menu_container an id and apply position: fixed; from there.

11-17-2011, 05:30 PM
after several days working on the iPad version of the site.. I was able to fix the problem..

the thing is that $(document).scroll() doesn't work on IE... instead I used $(window).scroll()

$(window).scroll() solved the effing problem... heads up to all newbs like me.. hehe :p

11-17-2011, 05:39 PM
the thing is that $(document).scroll() doesn't work on IE... instead I used $(window).scroll()
Which proves that you have presented the problem in a wrong way. You posted it as it would have been a CSS problem, but it was only your misunderstanding of JQuery syntax :)