[Zope] Cascading Style Sheets in Netscape 6
Craig Stoddart
craig.stoddart@dundeecity.gov.uk
5 Apr 2001 16:21:00 -0000
>Well, Im downloading NS6 to check myself but first glance it looks ok. But
>the end of your css declarance you have a gratuitous ; followed by the }...
>Try removing it=3F
I tried removing it, but it didn't have any effect.
>Perhaps also NS6 wants hex values for colors=3F Also, 'color' is used for
>tables and things other than font. My guess you want font-color or did you
>want the table cell to be gold=3F My understanding of Netscape is that if=
it
>cant render part of it, it doesnt at all.... Its either 100% or 0%... go
>figure.
I did want the table cell to be gold (it works perfectly in Netscape 4.75).=
I
did try changing to hex values but it didn't have any effect either.
>Another thing to try is using <span> tags over the fonts instead of
>rendering it on the table....
When I tried this, it didn't even work in Netscape 4.75 anymore, let alone
Netscape 6. I'll copy below the full CSS I'm using, as maybe there's some=
error
in it that I'm just not noticing:
<dtml-call "RESPONSE.setHeader('Content-Type','text/css')">
<dtml-call "REQUEST.set( 'sniffer', UserSniffer() )">
<dtml-call "REQUEST.set('site=5Ffonts', 'arial, helvetica, sans-serif')">
<dtml-if expr=3D"sniffer['platform'] =3D=3D 'Win32' and sniffer['browser']=
=3D=3D 'IE'">
<dtml-comment> ie needs smaller fonts than anyone else </dtml-comment>
<dtml-call "REQUEST.set('font=5Fsize', 'x-small')">
<dtml-call "REQUEST.set('font=5Fsmaller', 'xx-small')">
<dtml-call "REQUEST.set('font=5Fsmallest', '7pt')">
<dtml-elif expr=3D"sniffer['platform'] =3D=3D 'Win32'">
<dtml-comment> Netscape or others on WIntel </dtml-comment>
<dtml-call "REQUEST.set('font=5Fsize', 'small')">
<dtml-call "REQUEST.set('font=5Fsmaller', 'x-small')">
<dtml-call "REQUEST.set('font=5Fsmallest', 'x-small')">
<dtml-elif expr=3D"sniffer['platform'] =3D=3D 'Mac'">
<dtml-comment> Mac users need bigger fonts</dtml-comment>
<dtml-call "REQUEST.set('font=5Fsize', 'medium')">
<dtml-call "REQUEST.set('font=5Fsmaller', 'small')">
<dtml-call "REQUEST.set('font=5Fsmallest', 'x-small')">
<dtml-else>
<dtml-comment> Linux and all other users</dtml-comment>
<dtml-call "REQUEST.set('font=5Fsize', 'small')">
<dtml-call "REQUEST.set('font=5Fsmaller', 'x-small')">
<dtml-call "REQUEST.set('font=5Fsmallest', 'x-small')">
</dtml-if>
BODY , TH, TD, OL, UL, LI { font-family: arial, helvetica, sans-serif;
font-size: <dtml-var font=5Fsize>; }
P { font-family: <dtml-var site=5Ffonts>; font-size: <dtml-var font=5Fs=
ize>;
color: black;}
H1 { font-size: 175%; font-family: <dtml-var site=5Ffonts>; }
H2 { font-size: 150%; font-family: <dtml-var site=5Ffonts>; }
H3 { font-size: 125%; font-family: <dtml-var site=5Ffonts>; }
H4 { font-size: 100%; font-family: <dtml-var site=5Ffonts>; }
H5 { font-size: 75%; font-family: <dtml-var site=5Ffonts>; }
H6 { font-size: 50%; font-family: <dtml-var site=5Ffonts>; }
PRE, TT, CODE { font-family: courier, sans-serif; font-size: <dtml-var
font=5Fsize>; }
A:visited { color: purple; font-family : <dtml-var site=5Ffonts>; }
A: { color: blue; text-decoration: underline; font-family : <dtml-var
site=5Ffonts>; font-size : <dtml-var font=5Fsize>; )
A.menus { color: #FF6666; text-decoration: none; font-size: <dtml-var
font=5Fsmallest>; }
A.menus:visited { color:=20#FF6666; text-decoration: none; font-size:
<dtml-var font=5Fsmaller>; }
A.menus:hover { text-decoration: none; color: #FF6666; background: #ffa;
font-size: <dtml-var font=5Fsmaller>; }
A.menussel { color: #FF6666; text-decoration: none; background: #ffa;
font-size: <dtml-var font=5Fsmaller>; }
A.menussel:visited { color: #FF6666; text-decoration: none; background:
#ffa; font-size: <dtml-var font=5Fsmaller>; }
A.menussel:hover { text-decoration: none; color: #FF6666; background:=
#ffa;
font-size: <dtml-var font=5Fsmaller>; }
A.menusxxs { color: #FF6666; text-decoration: none; font-size: <dtml-var
font=5Fsmallest>; }
A.menusxxs:visited { color: #FF6666; text-decoration: none; font-size:
<dtml-var font=5Fsmallest>; }
A.menusxxs:hover=20{ text-decoration: none; color: #FF6666; background:=
#ffa;
font-size: <dtml-var font=5Fsmallest>; }
PRE {
font-family : "Courier New", Courier, monospace;
font-size : small;
font-style : normal;
font-variant : normal;
font-weight : normal;
color : Black}
.DCCIntra { background-color: #FFFFFF; font-size: 26pt;
font-weight: bold; color: black;
font-family: Arial, Helvetica, sans-serif;
font-style: italic}
.match { background-color: "#FFFF00"; font-weight: bold; color: #0000CC}
.newshead {font-family: Arial, Helvetica, sans-serif;
font-weight: bold; color: black;
background-color: #FFFFCC;
font-size: 14pt;
font-style: italic}
.newsitem {font-family: Arial, Helvetica, sans-serif;
=20 font-size: x-small;
color: Black;
font-style: normal}
.breadcrumbs { background-color: #FFFF33; font-size: <dtml-var font=5Fsize>;
font-weight: bold; color: blue;
font-family: Arial, Helvetica, sans-serif;
font-style: italic}
.OAA { background-color: green; font-size: 20pt;
font-weight: bold; color: gold;
font-family: Arial, Helvetica,=20sans-serif;
font-style: italic}
.OAAmenuhead { background-color: #8E6B23; font-size: 11pt;
font-weight: bold; color: gold;
font-family: Arial, Helvetica, sans-serif;
font-style: italic}
.menus { font-size: <dtml-var font=5Fsmaller>}
-------------------------------------------------
Craig Stoddart
IT Software Development Officer
Dundee City Council
IT Division
Northern College
Technical Block
Gardyne Road
Dundee DD5 1NY
Phone: 01382 438170
Fax: 01382 438002
E-mail: craig.stoddart@dundeecity.gov.uk
-------------------------------------------------