• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 793
  • Last Modified:

if IE @import in stylesheet

Hi

Could somebody please tell me if it is possible to import an external stylesheet into another external stylesheet, but only if the browser is IE?

Please note.  I am not asking how to do this in the head of an html file, but how to do it in the stylesheet itself.

Thanks

Something like

<!--[if IE]>
@import "/css/iewin.css";
<![endif]-->

body {}
etc...
0
Lady_M
Asked:
Lady_M
2 Solutions
 
gxp071Commented:
You can use @import in a style sheet to import another style sheets content but css had not browser specific conditional statements.

so basically no not to do what you want.
0
 
David S.Commented:
Conditional comments are an HTML thing, not a CSS thing.

So you want to have an IE only stylesheet without having to link another stylesheet from each document?

You could use this filter ( http://www.dynamicsitesolutions.com/css/filters/at-import-with-media/ ) to have an IE only one and and a non-IE one to override the settings in the IE one. It would work but it is a rather inefficient solution.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now