Solved

if IE @import in stylesheet

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

920 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

20 Experts available now in Live!

Get 1:1 Help Now