Zum Inhalt springen

Könnt mal jemand bitte mein Stylesheet überprüfen?

Erstellt am 30. September 2003 · 8 Antworten · letzte Antwort am 30. September 2003

Tags: Frage

sw-student ·

Hallo Leute,

hab vermutlich ein Problem mit meinem Stylesheet. Ich dachte, dass es eigentlich ganz gut funktioniert - bis zu dem Zeitpunkt, als ich mein Projekt auf einem anderen PC vorgestellt habe: Die komplette Formatierungen durch das Stylesheet waren verschwunden. Das Menü sah schrecklich aus. Mit dem ersten Klick auf einen Menüpunkt wurde die Formatierung übernommen. Nach Durchklicken aller Menüpunkte, sah es wieder ordentlich aus - aber dies ist ja nicht ganz Sinn der Sache. Könnt mal bitte einer drüberschaun, ob sich da ein Fehler eingelschlichen hat, bzw. falls der beschriebene Fehler an etwas anderem liegen könnte, mir bitte mitzuteilen.

body {

font-family: Verdana, Arial, Helvetica, Univers, 'Zurich BT', sans-serif;
font-size: 12px;
color: #333333;
font-weight: normal;
font-style: normal;
background-color: #336699;

scrollbar-base-color:silver;
scrollbar-arrow-color:#000080;
scrollbar-track-color:#86B1D5;
scrollbar-3dlight-color:#86B1D5;
scrollbar-highlight-color:#8F8F8F;
scrollbar-darkshadow-color:#86B1D5;
scrollbar-shadow-color:#8F8F8F;
scrollbar-face-color:#8F8F8F;
margin : 15px 0px 0px 0px;
}

a:link{color: #00007F;text-decoration: none;}
a:visited{color: #00007F;text-decoration: none;}
a:hover{color:#0040FF;text-decoration: none;}
a:active{color: #800080;text-decoration: none;}


h1 {
font-family: Arial, Helvetica, Univers, 'Zurich BT', sans-serif;
font-size: 14px;
color: #666666;
font-weight: bolder;
font-style: normal;
text-decoration: none;
margin-bottom: -1px;
}


h2 {
font-family: Arial, Helvetica, Univers, 'Zurich BT', sans-serif;
font-size: 13px;
color: #666666;
font-weight: bold;
font-style: normal;
text-decoration:none;
margin-bottom: -3px;
}

h3 {
font-family: Arial, Helvetica, Univers, 'Zurich BT', sans-serif;
font-size: 12px;
color: #666666;
font-weight: bold;
font-style: normal;
text-decoration:none;
margin-bottom: -3px;
}

td {
font-family: Arial, Helvetica, Univers, 'Zurich BT', sans-serif;
font-size: 12px;
color: #333333;
}

### Klasse für Menü-Ebene1 ###
a.menu1:link {font-size: 12px;font-weight: bolder;color: #0066CC;text-decoration: none;}
a.menu1:visited {font-size: 12px;font-weight: bolder;color: #0066CC;text-decoration: none;}
a.menu1:hover {font-size: 12px;font-weight: bolder;color: #0066CC;text-decoration: underline;}
a.menu1:active {font-size: 12px;font-weight: bolder;color: #0066CC;text-decoration: none;}

### Klasse für Menü-Ebene2 ###
a.menu2:link {font-size: 10px;color: #FFFFFF;font-weight: bolder;text-decoration: none;}
a.menu2:visited {font-size: 10px;font-weight: bolder;color: #FFFFFF;text-decoration: none;}
a.menu2:hover {font-size: 10px;font-weight: bolder;color: #FFFFFF;text-decoration: underline;}
a.menu2:active {font-size: 10px;font-weight: bolder;color: #FFFFFF;text-decoration: none;}

### Klasse für TopNav ###
a.top:link {font-size: 10px;color: #FFFFFF;font-weight: bolder;text-decoration: none;}
a.top:visited {font-size: 10px;font-weight: bolder;color: #FFFFFF;text-decoration: none;}
a.top:hover {font-size: 10px;font-weight: bolder;color: #00C0FF;text-decoration: none;}
a.top:active {font-size: 10px;font-weight: bolder;color: #0060FF;text-decoration: none;}

MIt fReunDLicheM GruSs

Sw-Student

Patric ·

Hier mal die Analyse deines Templates

http://sun.twc.de/typo3/analyse.html

Abgesehen davon, das deine Font Family kein Standard ist, und du manchmal sogar NUR Arial einbindest, kann ich keine gravierende Fehler finden....

Unter welchem Betriebssystem hast du das vorgeführt, und unter welchem hast du es entwickelt?

Gruß Patric

raini ·

ich kenn mich zwar mit css noch nicht so gut aus, aber ich glaube, deine kommentare sind falsch. könnte sein, dass das deswegen falsch geparst wird:

1.7 Comments

Textual comments in CSS style sheets are similar to those in the C programming language [7]:

EM { color: red } /* red, really red!! */
source: http://www.w3.org/TR/REC-CSS1#comments

du kannst ja dein stylesheet mal auf http://jigsaw.w3.org/css-validator/ testen, dann kannst du sicher gehen, dass das stylesheet korrekt ist.

schöne grüsse
rainer

Patric ·

wie kamst du auf diese Font Family:

font-family: Arial, Helvetica, Univers, 'Zurich BT', sans-serif;

mach mal diese ' ' bei "Zurich BT" weg....

sw-student ·

Hey, hab nach eurer Anleitung die Fehler behoben und siehe da, es scheint wirklich zu funktionieren! Woran es jetzt letztendlich wirklich lag ist schwer zu sagen.

Danke für den schnellen Support!!

raini ·

freut mich, dass es funktioniert! die font mit anführungszeichen war aber imo korrekt und empfohlen, dürfte aber auch ohne funktionieren:

5.5.2 'font-family'
[...]
Font names containing whitespace should be quoted:

BODY { font-family: "new century schoolbook", serif }

<BODY STYLE="font-family: 'My own font', fantasy">

If quoting is omitted, any whitespace characters before and after the font name are ignored and any sequence of whitespace characters inside the font name is converted to a single space.
source: http://www.w3.org/TR/REC-CSS1#font-family

grüsse
rainer