[ale] Netscape, CSS, and fonts
Randy Carpenter
randy at cc.gatech.edu
Fri Feb 9 09:43:17 EST 2001
We've worked with CSS alot and have learned that it's very difficult to come
up with one CSS that will work for every platform/browser combination.
Typically, when you modify a common CSS to fix one platform/browser
combination, you end up breaking another. So, we decided to maintain
different CSS definitions for certain platform/browser combinations that
caused us trouble. The advantages to this approach are that you can correct
problems that you discover on one combination w/o breaking the other and you
eliminate making compromises in your CSS.
We use "The Ultimate JavaScript Client Sniffer, Version 3.0" to determine the
platform/browser combination:
http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
Then, use simple javascript on each page to select the CSS. For example,
if (is.win)
document.write("<LINK REL=stylesheet TYPE=text/css HREF=/style/pc.css TITLE=ourhome>")
else
if (is.mac)
document.write("<LINK REL=stylesheet TYPE=text/css HREF=/style/mac.css TITLE=ourhome>")
else
if (is.unix)
document.write("<LINK REL=stylesheet TYPE=text/css HREF=/style/unix.css TITLE=ourhome>")
else
document.write("<LINK REL=stylesheet TYPE=text/css HREF=/style/main.css TITLE=ourhome>")
This technique has worked well for us.
Hope this helps,
Randy
On Thu, 8 Feb 2001, Dan Newcombe wrote:
> From: Dan Newcombe <Newcombe at mordor.clayton.edu>
> To: ALE <ale at ale.org>
> Subject: [ale] Netscape, CSS, and fonts
>
>
> I have a page I am updating (http://duck.clayton.edu/index-new2.html). It
> uses some basic CSS stuff in it, and looks mostly pretty in IE5.5. Some
> changes left to make, but it works for now.
>
> I pulled it up in Netscape on Win and it looked okay. I then tried it in
> Netscape 4.75 on Linux, and it looks horid. The problem is that for some
> elements, I have a style that says to use Arial, Helvetica, or Sans-Serif
> for the font...yet on Netscape on Linux, even though Helvetica is there,
> it refuses to use it. I've tried telling it to use other fonts, and it
> still won't.
>
> I put an image of it in NS at http://duck.clayton.edu/YUCK.jpg
>
> What do I need to do to get the Linux netscape to view this properly?
>
> Thanks!
> -Dan
>
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
___________________________________________________________________________
Randy Carpenter http://www.cc.gatech.edu/~randy
Georgia Institute of Technology randy at cc.gatech.edu
College of Computing (404) 894-9046
Computing and Networking Services Group http://www.cc.gatech.edu/cns
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list