E-mail List Archives
CSS linking
From: Leo Smith
Date: Mar 14, 2002 8:41AM
- Next message: Tim Harshbarger: "RE: Complication of the alt text issue"
- Previous message: Kynn Bartlett: "Re: List etiquette"
- Next message in Thread: Philip Pawley: "Re: CSS linking"
- Previous message in Thread: Philip Pawley: "Re: WebTV CSS support list"
- View all messages in this Thread
Philip,
Your technique of throwing off NS4 in your second stylesheet
linking method:
<.link rel="StyleSheet" href="n4free.css" type="text/css"
media="screen,print" title="alexanderworks" />
..is an interesting one that I have not seen before. Ordinarily I would
use the @import method for that.
My question is, if you go on to define a sheet purely for printing,
would some browsers get confused with two print media sheets.
So:
<.link rel="StyleSheet" href="style.css" type="text/css"
title="alexanderworks" /> <!--DEFAULT SHEET-->
<.link rel="StyleSheet" href="n4free.css"
type="text/css" media="screen,print" title="alexanderworks" /> <!--
NON-NS4 SHEET-->
<.link rel="StyleSheet" href="print.css"
type="text/css" media="print" title="alexanderworks" /> <!--PRINT
ONLY SHEET-->
Following the rules of the cascade, the print media only sheet is
specified last, and should therefore overide the previous print and
screen media sheet, and therefore there should be no confusion
about which styles the browser should actually use for printing.
However, I am wondering if this is the case, or whether using that
nifty NON-NS4 technique (media="screen, print") as well as a print
media only sheet would work well together.
Leo.
On 11 Mar 2002, at 21:24, Philip Pawley wrote:
> On my site, I use:
>
> <.link rel="StyleSheet" href="style.css" type="text/css"
> title="alexanderworks" /> <.link rel="StyleSheet" href="n4free.css"
> type="text/css" media="screen,print" title="alexanderworks" /> <.link
> rel="StyleSheet" href="webtv.css" type="text/css" media="tv"
> title="alexanderworks" /> [Initial dots added just in case the html is
> a problem].
>
> (I'm not sure whether the title attribute serves any purpose. It was
> recommended to me for some reason I can't remember).
>
> The first linked style sheet contains css for all browsers.
>
> The second contains the css that would mess up in Netscape 4. (N4 only
> reads style sheets with if the value of the media attribute is
> "screen" or - I believe - "all").
>
> The third style sheet is only read by WebTV.
>
> For N4, I have a JavaScript file that writes a <style
> type="text/css">..</style section into the html if the browser sniff
> code finds "netscape 4".
>
> At 11/03/02 11:48 -0600, you wrote:
> >Since WebTV does not support @import, it could be safe to say that
> >using @import for real browsers(excludes NNold too) would be good
> >then using a scaled down one for webTV might work.
>
> WebTV does support @import, albeit rather iffily. Using the JavaScript
> technique I use for N4 is also iffy in WebTV, but the <link ..
> media="tv" .. /> is, as far as I am aware, totally reliable. The
> drawback is that Internet Explorer and Opera both download the file,
> even though they do nothing with it?!
>
> >Though I do not like advocating separate browser sheets unless a user
> >selects a change, this might be an option for those of you that need
> >to code pages for MSN webTV.
> >
> >Support is really iffy, and this comes from MS, webTV, which may have
> >somehow taken over the web tv market?
>
> They're really clever folk over at Microsoft, don't you know.
>
> All the best,
>
> BTW thanks for the spur to switch to xhtml *strict*, Holly. I'm having
> a go and it seems to be working ok so far. Just one table with either
> 2 or 3 columns depending on the width of the browser window. The WebTV
> and N4 style sheets will use fixed fonts as the user can change sizes
> even so. Ems for all other browsers.
>
>
>
>
>
>
> --
> Philip Pawley
> Liverpool, UK
> http://www.alexanderworks.org/
> --
>
>
>
>
>
> ----
> To subscribe, unsubscribe, or view list archives,
> visit http://www.webaim.org/discussion/
>
Leo Smith
Web Designer/Developer
USM Office of Publications and Marketing
University of Southern Maine
207-780-4774
----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/
- Next message: Tim Harshbarger: "RE: Complication of the alt text issue"
- Previous message: Kynn Bartlett: "Re: List etiquette"
- Next message in Thread: Philip Pawley: "Re: CSS linking"
- Previous message in Thread: Philip Pawley: "Re: WebTV CSS support list"
- View all messages in this Thread