Solved

if IE @import in stylesheet

Posted on 2008-10-12
2
787 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS SASS 4 55
Responsive Font Size 6 61
How can I make the first part identical to the second ? 1 42
center div inside another div 2 30
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

738 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