开发者

Degrading jQuery, HTML5 heavy site

开发者 https://www.devze.com 2023-04-03 15:29 出处:网络
So, I\'m putting together a website that is using a jQuery nav-scroll plugin;it\'s a great resource, and is functional in IE, however it was developed using a lot of HTML 5 tags, which I ended up crea

So, I'm putting together a website that is using a jQuery nav-scroll plugin; it's a great resource, and is functional in IE, however it was developed using a lot of HTML 5 tags, which I ended up creating styles for and perfe开发者_运维百科cting the correlating CSS with.

Now, obviously, the site looks like a disaster in IE 6 & 7 as all the styles set to work with the HTML5 tags are not being rendered. Is my only option an conditional IE style sheet? Is there a better way?

The biggest problem is the styles are not being rendered in older IE versions and everything is being pushed, largely, to the right because of it. I'm also calling for a 'sticky jQuery' slide out menu/box twice - one at the top of site, one at the bottom of view. Again styles ignored, allowing functionality, but rendering terrible (uses CSS3 drop-shadows).

What would you guys suggest, conditional IE style-sheet the only way?


Use Modernizr to get older browsers (especially IE) to render the HTML5 tags. Read more about it here.

To pull in dosboy's suggestion, he's correct. According to the Modernizr docs, you should probably set them to display: block as well as using the Modernizr script itself. You could also tie in the HTML5 Reset stylesheets for the ultimate in HTML5 goodness.

0

精彩评论

暂无评论...
验证码 换一张
取 消