johkar wrote:
I need some browser implementation clarification.
In the below example, the alternate stylesheet could be invoked by
user agents that support alternate stylesheets or by script. Are
there any browsers that don't recognize "alternate stylesheet" as a
value of the rel attribute and just implement it automatically thus
overriding sheet2.css? Just need to know what I need to worry about.
<link href="sheet1.css" rel="stylesheet" type="text/css"
id="default1" />
<link href="sheet2" rel="stylesheet" type="text/css" id="default2"
title="Default" />
<link href="sheet3.css" rel="alternate stylesheet" type="text/css"
id="print" title="Print" />
Thanks
Alternate stylesheets can be invoked by scripts, yes, but they are
normally invoked directly by the user through some kind of browser
command. In the code you cited, sheet1.css and sheeet2 (assuming they
are served with the correct MIME type despite the second not having a
file extention) would actually be combined, according to CSS cascading
rules. Sheet3.css would be invoked by the user selecting the "Print"
alternate style from their browser menu.
If you want to have a print stylesheet invoked automatically when a
document is printed, use:
<link href="print.css" rel="stylesheet" type="text/css" id="print"
title="Print" media="print" />
The default value for the media attribute is "all", so any stylesheets
included with no media specified will also be used for printing. Again,
conflicts between stylesheets are resolved by CSS cascade rules.
--
David "Smith"
a.k.a. Vid the Kid
Does this font make me look fat?