Re(2): Re(2): [Zope] Cascading Style Sheets in N
etscape 6
Craig Stoddart
craig.stoddart@dundeecity.gov.uk
6 Apr 2001 16:02:00 -0000
>The best thing to do is to capture the source FROM WITHIN NETSCAPE ITSELF.
>That is what Netscape sees. I know that NS 6 is pretty good about css, and
>its javascript works right for most of my pages. So the chances are that
>the html it is receiving has some oddity. You need to capture it so we can
>see.
I'm not entirely sure if I understand what you mean, but when I do "View Pa=
ge
Source" In Netscape 6 the code is reflected as it should be. I know how fus=
sy
Netscape is about missing HTML tags, but as the CSS work well in Netscape=
4.75
I do not understand why it isn't working on Netscape 6, nor do I understand=
why
my=20Java no longer works either. Unfortunately the site in question is on=
our
intranet so I can't give you a link to it, but this is the code that I get=
when
I do "View Page Source" in Netscape 6. There are 3 items that should respon=
d to
the style sheet - OAA, menus & OAAmenuhead - yet none of them work in Netsc=
ape
6. What confuses me even more is the fact that at the top of my CSS I have=
the
line: <dtml-call "REQUEST.set('site=5Ffonts', 'arial, helvetica, sans-serif=
')">
and Netscape 6 does recognise this (as it uses that font). It just doesn't
recognise any of the variables I have set up in my style sheet.
<HTML><HEAD> <base href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/" />
<TITLE>Outdoor Adventure Activities </TITLE> <link HREF=3D"http://intranet.
dundeecity.gov.uk/intranet/outdoor-safety/styles/global.css" rel=3D"stylesh=
eet"
type=3D"text/css"> </HEAD>
<BODY BGCOLOR=3D"#FFFFFF">
<DIV ID=3D"overDiv" STYLE=3D"position:absolute; visibility:hide; z-index:1;=
"></DIV>
<SCRIPT LANGUAGE=3D"JavaScript" SRC=3D"/js/overlib.js"></script>
<TABLE WIDTH=3D"100%" BORDER=3D"0" CELLPADDING=3D"0" CELLSPACING=3D"0">
<TR> <TD ALIGN=3D"LEFT" WIDTH=3D"10%"><a href=3D"http://intranet.dundeecity=
.gov.
uk/intranet/depts/nrdd/"><img src=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/nhrd=5Fsmall.jpg" alt=3D"Neighbourhood Resources
Intranet Site" border=3D"0"></a></TD>
<TD class=3D"OAA" align=3D"center">OUTDOOR ADVENTURE ACTIVITIES</TD>
<TD ALIGN=3D"LEFT" VALIGN=3D"TOP"
WIDTH=3D"10%"><a href=3D"http://www.aala.org/"><img src=3D"http://intrane=
t.
dundeecity.gov.uk/intranet/outdoor-safety/aala.gif" alt=3D"Adventure Acti=
vities
Licensing Authority" border=3D"0"></a></TD> </TR>
<!-- Introduce some vertical whitespace -->
<TR><TD COLSPAN=3D"3"> </TD></TR> <TR> <TD width=3D"10%" valign=3D"top=
">
<table bgcolor=3D"#8E6B23" border=3D"0" cellpadding=3D"0"
cellspacing=3D"0" width=3D"120" height=3D"363"> <tr> <td> <table bo=
rder=3D"0"
cellpadding=3D"3" cellspacing=3D"1"
width=3D"100%"> <tr> <td bgcolor=3D"#8E6B23" align=3D"left"><SPAN
class=3D"OAAmenuhead">Outdoor
Menu</span></td> </tr> <tr> <td bgcolor=3D"white" valign=3D"top=
"> <font
size=3D"-2">
<a href=3D"http://intranet/"><SPAN class=3D"menus">DCC Intranet</span></a><=
br><br>
<a href=3D"http://intranet.dundeecity.gov.uk/intranet/outdoor-safety"><SPAN
class=3D"menus">Safety Site Homepage</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/SafetyManagement/"><SPAN class=3D"menus">Sa=
fety
Management</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/OAARegs/"><SPAN class=3D"menus">Outdoor Adv=
enture
Activities Regulations</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/AAL/"><SPAN class=3D"menus">Adventure Activ=
ities
Licensing</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/PDA/"><SPAN class=3D"menus">Personnel Datab=
ase
Accreditation</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/ExternalAgencies/"><SPAN class=3D"menus">Ex=
ternal
Agencies/ Service Level Agreements</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/Infolog/"><SPAN class=3D"menus">Safety/Near=
Miss
Infolog</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/forum/"><SPAN class=3D"menus">Discussion
Forum</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/training=5Fop/"><SPAN class=3D"menus">Training
Opportunities</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/DukeEdinburgh/"><SPAN=20class=3D"menus">Duk=
e of
Edinburgh's Award - Expedition /Exploration Requirements</span></a><br><br>
<a href=3D"http://intranet.dundeecity.gov.
uk/intranet/outdoor-safety/docs/Further/"><SPAN class=3D"menus">Further
Information / Guidance</span></a><br><br> =20</font> </td> </tr> </table>=
</td>
</tr> </table>
<br> </td> <td colspan=3D"2" valign=3D"top">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META
HTTP-EQUIV=3D"CONTENT-TYPE" CONTENT=3D"text/html; charset=3Diso-8859-1">
<TITLE>SAFETY SITE HOMEPAGE</TITLE> <META NAME=3D"GENERATOR"
CONTENT=3D"StarOffice/5.2 (Win32)"> <META NAME=3D"CREATED" CONTENT=3D"20010=
123;
16005737"> <META NAME=3D"CHANGEDBY" CONTENT=3D"Craig Stoddart"> <META
NAME=3D"CHANGED" CONTENT=3D"20010125;11211796"> </HEAD> <BODY> <H3
ALIGN=3DCENTER><B>SAFETY SITE HOMEPAGE</B> </H3> <P ALIGN=3DCENTER><B>Welco=
me to
Dundee City Council Homepage for
information and guidance on the operation and</B> </P> <P
ALIGN=3DCENTER><B>regulation of tuition in outdoor adventure
activities under the management of=20Dundee City Council</B> </P> <P
ALIGN=3DCENTER><IMG SRC=3D"homepage.jpg" NAME=3D"Graphic1" ALIGN=3DBOTTOM=
WIDTH=3D451
HEIGHT=3D302 BORDER=3D0> </P> <P><B>For information/guidance on any of the=
content
of this website
please contact: A D Boffey, Manager, Neighbourhood Resources &
Development Department, Podium Block, Tayside House, Crichton Street,
Dundee, DD1 3RZ. Tel 01382 433972, Fax 01382 433871, E-mail:
<A HREF=3D"mailto:tony.boffey@dundeecity.gov.uk"><U>tony.boffey@dundeecity.=
gov.
uk</U></A></B> </P> </BODY> </HTML> </td> </tr> </TABLE> </body> </html>
</BODY></HTML>
This is the code in my CSS:
<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')">
=20<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=20{ color: #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 { 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=20: 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;
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}
<dtml-comment> Outdoor Activities Styles</dtml-comment>
.OAA { background-color: green; font-size: 20pt;
font-weight: bold; color: gold;
font-family: Arial, Helvetica, sans-serif;
font-style: italic}
.OAAmenuhead { background-color: #8E6B23; font-size: 11pt;
font-weight: bold; color: gold;
font-family: Arial, Helvetica, sans-serif;
=20 font-style: italic}
.menus { font-size: <dtml-var font=5Fsmaller>}
I have tried putting <style type=3D"text/css"> </style> tags at the beginni=
ng and
end of the CSS but that didn't make any difference, hence why I removed the=
m.
If you can give tell me where I'm going wrong I'd be very grateful as I've=
been
trying to figure this out for 3 days now without getting anywhere, and if=
I
can't get it to work then I'm going to have to scrap all the variables in=
the
CSS and hardcode them all in in HTML=20as the website has to be compatible=
will
all browsers, including Netscape 6.
-------------------------------------------------
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
-------------------------------------------------