If IE CSS Q
- Started
- Last post
- 2 Responses
- susan-deaux
Hi, I'm trying to use the if IE trick to swap stylesheets for ie5 - 6. It's not working.
When I remove the regular link to the stylesheet, IE can sense the right one and it works.
code modified to stick
< !--[if IE]>
< style type="text/css" title="style" media="screen">
@import "lib/index_ie.css";< ![endif]-->
But when I put both in like it's supposed to be, it seems like the regular sheet always overwrites, even if I call the page from IE.
code modified to stick
< style type = "text/css" title="style" media="screen" >
@import "lib/index.css";< !--[if IE]>
< style type="text/css" title="style" media="screen" >
@import "lib/index_ie.css";
< / style>
< ![endif]-- >Anyone know what's wrong?
FYI all of the styles in each file are exactly the same for the most part.
Thanks.
- randalldon0
You may want to look at a different solution as i'm pretty sure this IE hack breaks in IE 7 anyway. Its not really future proof or standards compliant.
You'd be better off looking at dynamic stylesheet generation probably using PHP. Digital Bonsai have got a really useful article on this -
http://www.digitalbonsai.com/php…
Hope that helps!
- susan-deaux0
I'd much rather go for that.
Thanks.