[thelist] Cool CSS hack & a new IE 6 feature

Beau Hartshorne beau at members.evolt.org
Mon Sep 24 22:24:40 CDT 2001


The align="center" thing is a feature, as far as I can tell. IE 6 is
rendering your pages as standards compliant, to the analth degree.

The @import redraw is not a feature. It's just a side effect of using
that workaround. The workaround to the side effect of the workaround (I
think) is to do this:

<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css" media="screen">@import "style2.css";</style>

Notice that there are two style sheet references. The first, style.css,
will be read by Netscape, and by Internet Explorer. This style sheet can
contain all the css goodies that you think Netscape can handle. The
@import feature is not supported in Netscape. So you can include
whatever extra goodies that Netscape chokes on in style2.css. In theory,
your page won't have that 1 or 2 second flip between unstyled and styled
layout. An other bonus is that your page will look OK in Netscape,
because you'll still be using at least a few of the supported css
features.

To clarify again, http://www.bluerobot.com 's code looks like this:

<style type="text/css" media="all">@import "blue.css";</style>

Instead of:

<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css" media="screen">@import "style2.css";</style>

Hope this helps,

Beau

> That's really a feature?  I thought it was my slow modem 
> taking its time loading the css file...
> 
> rick
> http://techno-weenie.com





More information about the thelist mailing list