...

View Full Version : Serving IE/Win the correct stylesheet



gsnedders
07-10-2005, 11:48 PM
Is there an IE/Win equivalent on IE/Mac backslash hack?

I need IE/Win to ignore @import "style.css";

I've realised this isn't what I need... Give me a min to type up what I do need

So far I've got this code:
/* IE Mac Hack \*/
@import "style.css";
/* End IE Mac Hack */
/* Get this style sheet, if the browser is IE5 Mac */
@import("ie.css");What I need to do is serve IE/Win ie.css, not style.css

mark87
07-11-2005, 01:44 AM
See if this helps -

http://www.thesitewizard.com/css/excludecss.shtml

Think you'd be looking at using this -

<![if !IE 6]>
<link rel="stylesheet" type="text/css" href="not-ie.css" />
<![endif]>

That stylesheet is for non-IE browsers.

Then this is for IE6+ -

<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->

gsnedders
07-11-2005, 02:02 AM
Ah - After playing around a bit more I found my problem - conditional comments don't play well inside <style type="text/css">

Final code:

<![if !IE]>
<style type="text/css">
/* IE Mac Hack \*/
@import "style.css";
/* End IE Mac Hack */
/* Get this style sheet, if the browser is IE5 Mac */
@import("ie.css");
</style>
<![endif]>
<!--[if IE]>
<style type="text/css">
@import "ie.css";
</style>
<![endif]-->



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum