>> Alternate stylesheets can be invoked by scripts, yes, but they are
>> normally invoked directly by the user through some kind of browser
[quoted text clipped - 10 lines]
> I'm curious - what purpose does the id attribute serve here? I've never
> used it on stylesheets before.
Outside of an accessing script, I believe there is no purpose.
http://www.w3.org/TR/html4/struct/links.html#h-12.3
Calls its use a "document-wide identifier." And:
http://www.w3.org/TR/html4/struct/global.html#id-and-class
Refers to it as a style sheet selector, and a means to reference a particular element from
a script.
-Lost
> > Alternate stylesheets can be invoked by scripts, yes, but they are
> > normally invoked directly by the user through some kind of browser
[quoted text clipped - 13 lines]
> --
> Berg
Sorry, I have been absent after my original post. I realize you can
use media=print, but some usability gurus poo poo this idea...there
seems to be two camps. One camp advocates using media=print and the
other wants to invoke stylesheet switching either using JavaScript or
the server to show the printable page to the user in a new window.
There can be much debate over which to do. One question which has not
really been addressed is when did "alternate stylesheet" become a
valid value for the rel attribute...and what is the browser support
for it? I realize that could be a question for the HTML newsgroup,
but there is some crossover.
Andreas Prilop - 29 Mar 2007 14:29 GMT
> I realize you can
> use media=print, but some usability gurus poo poo this idea...
References?
> One question which has not
> really been addressed is when did "alternate stylesheet" become a
> valid value for the rel attribute...
In CSS level 1, i.e. 1996.
http://www.htmlhelp.com/reference/css/style-html.html#external
> and what is the browser support for it?
Internet Explorer 6 fails - real browsers support alternative
stylesheets.
> I realize that could be a question for the HTML newsgroup,
No, this is the right group.

Signature
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell
Bergamot - 29 Mar 2007 19:03 GMT
>> > <link href="print.css" rel="stylesheet" type="text/css" id="print"
>> > title="Print" media="print" />
>>
>> I'm curious - what purpose does the id attribute serve here?
>
> I realize you can use media=print,
Am I reading your response wrong, or did you read my question wrong? :)
> but some usability gurus poo poo this idea...
This is the first I've heard that opinion. I use print stylesheets all
the time.
> One camp advocates using media=print and the
> other wants to invoke stylesheet switching either using JavaScript or
> the server to show the printable page to the user in a new window.
The latter is the way things were done before print stylesheets had any
real support. Why continue an outdated practice if you don't have to?
It's just more work, and I don't see any benefit to the user.
BTW, you don't need a separate stylesheet just for print. You can also
use @media rules within a common stylesheet. This is my preferred way of
setting print rules.
@media screen, projection {rules}
@media screen, projection, print {rules}
@media print {rules}
The navigation menu styling, background images and other screen-only
things are in the first group. General content formatting is usually in
the second group. The last group sets display:none on the navigation
menu and other things that shouldn't be printed and occasionally has
some extra styling just for print.
It works for me. YMMV

Signature
Berg