From: Mark Shroyer on
I just completed a new design for a personal web site. After finishing
the basic CSS stuff and double-checking it in Safari, FF, Opera, et al.,
I put on my war paint and fired up IE7 to figure out what kind of hacks
I'd have to apply. Delightfully, IE7 only needed four or five tweaks
this time around...

But next I opened the test page in my IE6 VM, and it took me a few
seconds to even realize what the heck I was looking at. I could
possibly make it render halfway decently with several hours' work, but
why bother? It's just a crummy personal web page. What I'd like to do
instead is to somehow trick IE6 into not loading any styles whatsoever,
so that the page renders like it would in, e.g., lynx; I have the luxury
of not jumping through hoops for IE6 users here, but I don't feel like
leaving the site non-navigable to them, either.

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.

Any suggestions? Thanks in advance...

--
Mark Shroyer, http://markshroyer.com/contact/
I have joined others in blocking Google Groups due to excessive
spam. If you want more people to see your posts, you should use
another means of posting on Usenet. http://improve-usenet.org/
From: Bjoern Hoehrmann on
* Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
>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(a)hoehrmann.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/
From: Mark Shroyer on
In article <usenet-mail-9EC2CB.15442924042008(a)snap.homestarmy.net>,
Mark Shroyer <usenet-mail(a)markshroyer.com> wrote:

> 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.


I managed to come up with something that works after a little more
fooling around:

<style type="text/css">
@import url('screen.css') screen;
@import url('print.css') print;
</style>
<!--[if IE 7]>
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="iehack7.css" />
<![endif]-->

It turns out that IE 6 can't understand media specifiers in the context
of an @import directive, so it just ignores the entire directive.
Unfortunately, IE 7 does not understand this either, so it is necessary
to load the screen stylesheet with <link> inside an IE 7 conditional
comment.

I'd still be interested to hear other suggestions, though... or any
takes on whether this is a wise thing to do. (Is there anything else
out there other than pre-7 versions of IE that's likely to choke on
this?)

--
Mark Shroyer, http://markshroyer.com/contact/
I have joined others in blocking Google Groups due to excessive
spam. If you want more people to see your posts, you should use
another means of posting on Usenet. http://improve-usenet.org/
From: Mark Shroyer on
In article
<bbp114domkk1j2ch1ipqk4kd8ltslhvv68(a)hive.bjoern.hoehrmann.de>,
Bjoern Hoehrmann <bjoern(a)hoehrmann.de> wrote:

> * Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
> >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.


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.

[* Unless there's something else I'm failing to understand...]

--
Mark Shroyer, http://markshroyer.com/contact/
I have joined others in blocking Google Groups due to excessive
spam. If you want more people to see your posts, you should use
another means of posting on Usenet. http://improve-usenet.org/
From: Bjoern Hoehrmann on
* Mark Shroyer wrote in comp.infosystems.www.authoring.stylesheets:
>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(a)hoehrmann.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/