Re: conditional stylesheets?
by "Rossi Designs" <webmaster(at)rossidesigns.net>
|
Date: |
Mon, 3 Apr 2000 23:46:49 -0400 |
To: |
"Robert Clendaniel" <robert(at)baylogic.com>, "HTML Writer's Guild" <hwg-techniques(at)hwg.org> |
References: |
baylogic |
|
todo: View
Thread,
Original
|
|
<script language="javascript">
<!-- put this in the head of your document
platform = navigator.platform;
if (platform == "mac") {
stylesheet = "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"mac.css\">";
} else {
stylesheet = "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"pc.css\">";
}
document.write(stylesheet);
// -->
</script>
First make a test script that prints navigator.platform onto the screen so
you can see if it says "mac" or "macintosh" or whatever because I'm not sure
Rossi Designs
PO Box 1084
Holly Hill, FL 32125-1084
Phone : (904) 226-8979
URL : http://rossidesigns.net
----- Original Message -----
From: Robert Clendaniel <robert(at)baylogic.com>
To: HTML Writer's Guild <hwg-techniques(at)hwg.org>
Sent: Monday, April 03, 2000 10:25 PM
Subject: conditional stylesheets?
| We did a redesign for an old client which looks OK on every
| machine we've tested it on - except, alas, the Mac which our
| contact at the client firm has.
|
| The main problem is that the Mac insists on rendering text about
| 2 point sizes smaller than the PCs, no matter that I am setting
| point size in an external stylesheet.
|
| This set me to wondering if you could call an external stylesheet
| via some JavaScript that tested for the type of system - I could
| simply test for a Mac and link in a stylesheet with larger text
| sizes.
|
| (FWIW an example of the problem pages is at
| http://beowulf2.baylogic.com/newchop/aboutus/aboutus.html).
|
| Has anybody done this that they could share the JavaScript with
| me? TIA!
|
| Robert L. Clendaniel
| BayLogic Internet Marketing Inc.
| robert(at)baylogic.com
| http://www.baylogic.com/
|
|
|
|
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA