Solved

if IE @import in stylesheet

Posted on 2008-10-12
2
780 Views
Last Modified: 2008-10-19
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
Comment
Question by:Lady_M
2 Comments
 
LVL 6

Accepted Solution

by:
gxp071 earned 125 total points
ID: 22701065
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
 
LVL 42

Assisted Solution

by:David S.
David S. earned 125 total points
ID: 22701661
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now