Carolyn Marenger wrote:
To the best of my knowledge, you are stuck with having to rewrite the
entire style sheet for the second media type.
I got an idea from the HTML 4.01 Specification, Chapter 14 [1] and tried
to define two preferred style sheets inside <head> section:
<link rel="stylesheet" type="text/css" title="pref" media="handheld"
href="handheld.css" />
<link rel="stylesheet" type="text/css" title="pref" media="screen"
href="screen.css" />
According to the chapter 14.4.1: "Both LINK and STYLE may be used with
the media attribute. The user agent is then responsible for filtering
out those style sheets that do not apply to the current medium." On the
other hand, a standard handheld medium should not use screen.css, if it
supports handheld media type, since in chapter 14.3.2 it is told that
"If two or more LINK elements specify a preferred style sheet, the first
one takes precedence."
Unfortunately, the XHTML browser of the mobile phone I use, does not
follow these rules; it uses both style sheets. I tried to change the
title of the second link tag, but it did not help; in the contrary
Firefox 1.5 uses neither of the style sheets then.
[1]
http://www.w3.org/TR/html4/present/styles.html
--
Homepage
http://www.iki.fi/jarno.suni/