HighDots Forums  

Re: Preventing IE6 from loading stylesheet

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Preventing IE6 from loading stylesheet in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bjoern Hoehrmann
 
Posts: n/a

Default Re: Preventing IE6 from loading stylesheet - 04-24-2008 , 02:55 PM






* Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
Quote:
I know about the <!--[if lte IE 6]>...<![endif]--> thing, but what I
want is basically the logical inverse of that, so that I can prevent IE6
from loading any of my CSS to begin with: some relatively stable way of
making an @import directive or an HTML <link rel="stylesheet"... /
visible to everything *but* IE6.
If conditional comments would work for you, I suggest you have a look at
http://msdn2.microsoft.com/en-us/library/ms537512.aspx which should have
the right expression for you.
--
Björn Höhrmann · mailto:bjoern (AT) hoehrmann (DOT) de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/


Reply With Quote
  #2  
Old   
Bjoern Hoehrmann
 
Posts: n/a

Default Re: Preventing IE6 from loading stylesheet - 04-24-2008 , 04:11 PM






* Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
Quote:
Thanks for the hint, but that doesn't quite work*... but I probably
should have been more specific with regard to my 'requirements'. While
something like

![if !(IE 6)]
link rel="stylesheet" ... /
![endif]

works most places, it is not valid XHTML so I'd like to avoid it. On
the other hand, I don't mind using the other form of conditional
comments (which I mentioned above) because it is valid HTML.
You can use the form you are comfortable with, e.g.

<!--[if gt IE 6]>
...
<![endif]-->

would be valid and hidden from Internet Explorer 6.0; using

<!--[if !(IE 6)]>
...
<![endif]-->

would exclude Internet Explorer 6 aswell, but include its predecessors.
--
Björn Höhrmann · mailto:bjoern (AT) hoehrmann (DOT) de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/


Reply With Quote
  #3  
Old   
Bjoern Hoehrmann
 
Posts: n/a

Default Re: Preventing IE6 from loading stylesheet - 04-24-2008 , 05:40 PM



* Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
Quote:
Sure it would be hidden from IE 6, but it would be hidden from every
other browser as well.
I see, then you can use the method proposed in the comments there,

<!--[if gt IE 6]><!-->
...
<!--<![endif]-->

Here Validators and other browsers will treat this as two comments
with "..." between them, while Internet Explorer 6 and predecessors
with support for conditional comments will treat it differently.
What they see is probably not "valid HTML" but this is as close as
you will get as far as ease of use is concerned.
--
Björn Höhrmann · mailto:bjoern (AT) hoehrmann (DOT) de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.