On Wed, 16 Apr 2008 00:27:20 +0200
Manfred Staudinger wrote:
> On 15/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
> > You can use this syntax to target all NON-MSIE browsers:
> > <!--[if !IE]> <-->
> > <style type="text/css">@import url("css/fix/non_msie.css");</style>
> > <!--> <![endif]-->
>
> Thats definitely an unnecessary hack. The correct (although
> proprietary) syntax would be:
> <!--[if IE]><![if !IE]><![endif]-->
> <style type="text/css">
> css here
> </style>
> <!--[if IE]><![endif]><![endif]-->
>
I find these both particularly ugly and use the '@import hack' instead.
Just a normal line in the HTML and the real hack in the CSS code itself.
After all it is the presentation, design or functionality that is the
issue, *not the content*.
This is all i have in the (X)HTML
<link rel="stylesheet" href="master.css" type="text/css" />
But heres the CSS master file
/* ** master.css ** */
@import url("layout.css");
@import url("colour.css");
@import url("fonts.css");
@import url(.css) all;
/* **************** */
That's it; the trick is in that final line. IE loads a file called
"url(.css) all" and all other browsers load a file called ".css". It
relies on a bug in IE. I usually have very few hacks in the ".css" file
compared to the "url(.css) all" file.
I first read about this hack here:
http://annevankesteren.nl/2005/10/ie-import-hack
A full range of @import hacks and browsers affected are here:
http://imfo.ru/csstest/css_hacks/import.php
But my requirements are not that specific.
--
Michael
All shall be well, and all shall be well, and all manner of things shall
be well
- Julian of Norwich 1342 - 1416
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/