...

View Full Version : HTML5 position fixed in IE8



jhaycutexp
11-08-2011, 03: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..

Thanks

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

Excavator
11-08-2011, 03: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/).

jhaycutexp
11-09-2011, 01: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..
http://dev.andrewfopalan.com/new_navigation_design_rev.html

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 :)

Excavator
11-09-2011, 03: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.

jhaycutexp
11-17-2011, 04: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

Kor
11-17-2011, 04: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 :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum