Introduction
These were some experiments in using CSS to provide different versions
of the same web page. The different browsers available offer different
CSS support. These are the versions we had:
- PC:
Opera 5.5
IE 5.11
Netscape 4.7
- Unix:
Netscape 4.7
Mozilla 1.4
(no Opera)
- Linux:
Mozilla 1.7.7
Opera 7.11
Firefox 1.0 (lightweight Mozilla: just a browser, not a mailer, etc.)
(no Netscape)
Generally Opera 7.11 and Firefox 1.0 offered the best CSS support, so we
concentrated on these.
Mechanisms
We used CSS style sheets.
There are four possible mechanisms:
-
a style sheet embedded in a document.
-
a separate, persistent, style sheet, access using LINK.
-
a separate, preferred, style sheet accessed using LINK.
-
a set of alternative style sheets, stored separately and accessed using LINK.
Some results
-
Browser support for CSS is very patchy (sometimes because I did not have access to
the latest versions).
Hence the concentration on the two browsers mentioned above.
-
Subject to the above the experiment worked OK, though the user had to select
their chosen style using the browser's menu (e.g. ia View/Page-style).
-
Pictures and links also worked OK, i.e. they could be in one version but not the other.
However style attributes such as colour tended not to be applied to these, even
if pictures were monochrome.
-
Versions cannot be applied to page titles, since they come in the HEAD.
- The style attribute "display: none" seemed the best way of making a style
invisible.