Hello
While googling for this topic I found lots of advice on how to use
@media rules to _hide_ stuff from Mac IE. Anyway, actually _using_
@media to write media specific CSS for both Win and Mac IE 5 seems to be
less covered. (I know Mac IE is dead, but some of my audiences possibly
still use older computers...)
So this is what I tried so far to apply specific style sheets for screen
and print:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css" media="screen">
@import url("screen.css ");
</style>
<style type="text/css" media="print">
@import url("print.css" );
</style>
It turned out that IE 5.x on Windows could not handle these (while Mac
IE 5 had no problem). So I changed it to:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css">
@import url("screen.css ");
@import url("print.css" );
</style>
and surrounded the codes in screen.css and print.css with @media
blocks. It works in Win IE 5.x like a charm, but now Mac IE 5 does not
recognize the styles anymore.
I tried versions with conditional comments; they do not work, as I can't
hide something from IE 5 while keeping it visible for non-IE browsers.
Using the link tag instead of @import has the downside to make the
stylesheets available for Netscape 4 and IE 4, that should actually only
see basic.css.
Is there any known way to apply media specific style sheets supporting
IE 5.x on both Windows and Mac?
Thanks for pointing me to the right direction...
Markus
While googling for this topic I found lots of advice on how to use
@media rules to _hide_ stuff from Mac IE. Anyway, actually _using_
@media to write media specific CSS for both Win and Mac IE 5 seems to be
less covered. (I know Mac IE is dead, but some of my audiences possibly
still use older computers...)
So this is what I tried so far to apply specific style sheets for screen
and print:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css" media="screen">
@import url("screen.css ");
</style>
<style type="text/css" media="print">
@import url("print.css" );
</style>
It turned out that IE 5.x on Windows could not handle these (while Mac
IE 5 had no problem). So I changed it to:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css">
@import url("screen.css ");
@import url("print.css" );
</style>
and surrounded the codes in screen.css and print.css with @media
blocks. It works in Win IE 5.x like a charm, but now Mac IE 5 does not
recognize the styles anymore.
I tried versions with conditional comments; they do not work, as I can't
hide something from IE 5 while keeping it visible for non-IE browsers.
Using the link tag instead of @import has the downside to make the
stylesheets available for Netscape 4 and IE 4, that should actually only
see basic.css.
Is there any known way to apply media specific style sheets supporting
IE 5.x on both Windows and Mac?
Thanks for pointing me to the right direction...
Markus
Comment