Solved

if IE @import in stylesheet

Posted on 2008-10-12
2
783 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

813 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

16 Experts available now in Live!

Get 1:1 Help Now