Solved

Conditional CSS in Themes

Posted on 2008-10-03
2
1,298 Views
Last Modified: 2008-10-26
Hi,
I am adopting Themes for my website and have a situation where I need to only use a CSS file based on the current IE Version - i.e some IE6 hacks.
Before Themes, I used to add the following statement to the page header:

<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="css/iefixes.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="css/ie7fixes.css" /><![endif]-->

How would I do this with themes?
0
Comment
Question by:km176351
2 Comments
 
LVL 20

Assisted Solution

by:REA_ANDREW
REA_ANDREW earned 20 total points
ID: 22633212
Have you looked at using an ASP.NET Browser file to differentiate between behaviour between browsers.
0
 
LVL 1

Accepted Solution

by:
km176351 earned 0 total points
ID: 22770654
In the pages section of the web.config file, I have chosen to use StylesheetTheme rather than Theme. This loads all theme stylesheets first and then I can still have my conditional statement directly in a page to load the fixes last
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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 tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

705 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