Re: Re[2]: [gutvol-d] More than you ever wanted to know about XHTML andCSS (gutv

----- Original Message ----- From: "Jon Noring" <jon@noring.name>
On another matter, how Firefox handles multiple <style>'s is way cool. Is there some mechanism using Firefox to also select one among several supplied *external* stylesheets?
Yes! You can define a virtually unlimited number of styles, one after another, in the beginning of your HTML file. Firefox will default to the first one, but you can switch on the fly under the View -> Page Style menu. Just to make it more frustrating, IE picks the LAST style out of the list to display. *rolls eyes* Disclaimer: I may have the first and last backwards. Firefox may pick the last and IE the first. I just know they never AGREE on which one to display by default. Josh

Joshua Hutchinson wrote:
You can define a virtually unlimited number of styles, one after another, in the beginning of your HTML file. Firefox will default to the first one, but you can switch on the fly under the View -> Page Style menu.
Just to make it more frustrating, IE picks the LAST style out of the list to display. *rolls eyes*
Disclaimer: I may have the first and last backwards. Firefox may pick the last and IE the first. I just know they never AGREE on which one to display by default.
The HTML 4 Rec, at http://www.w3.org/TR/html4/present/styles.html#h-14.3.1 talks about multiple mutually exclusive style sheets, of which one can be 'preferred'. (Browsers should apply the preferred style sheet, if the user hasn't selected a different one.) However, the syntax by which the author specifies the preferred style sheet appears to only apply to *external* style sheets, referenced via <LINK> elements. Marcello Perathoner wrote:
<HEAD> <STYLE type="text/css" title="red"> P { color: red } </STYLE> <STYLE type="text/css" title="blue"> P { color: blue } </STYLE> <STYLE type="text/css" title="green"> P { color: green } </STYLE> </HEAD> <BODY> <P>Don't show this to any DP Project Manager. </BODY>
For *internal* style sheets, defined within <STYLE> elements as above, it seems to me that the Rec is silent on the meaning/significance of attaching a 'title' attribute to a STYLE element. And even more silent on the significance of multiple such elements. (Or how they should interact with external style sheets.) As far as I can tell, this also applies to versions of XHTML up to 2.0. -Michael Dyck

"Joshua Hutchinson" <joshua@hutchinson.net> writes:
Disclaimer: I may have the first and last backwards. Firefox may pick the last and IE the first. I just know they never AGREE on which one to display by default.
IIRC, the 'rel' attribute define the default stylesheet; additional stylesheets should set it to "alternate stylesheet": <link rel="stylesheet" title="Compact" href="bell.css" type="text/css"> <link rel="alternate stylesheet" title="With Page Markers and Meta Info" href="bell-pb.css" type="text/css"> -- http://www.gnu.franken.de/ke/ | ,__o | _-\_<, | (*)/'(*) Key fingerprint = F138 B28F B7ED E0AC 1AB4 AA7F C90A 35C3 E9D0 5D1C
participants (3)
-
Joshua Hutchinson
-
Karl Eichwalder
-
Michael Dyck