Hallo!
Ich hatte vor ein paar Wochen, als ich meine eigene Homepage gemacht habe, folgendes Problem: CSS Formatierungen die in direkt jeder HTML-Datei aufgeführt wurden (so wie’s jetzt ist) werden korrekt interpretiert vom Browser, allerdings ist es mir damals nicht gelungen, diese in eine externe .css Datei auszulagern. Die Formatierungs-Infos wurden einfach ignoriert. (Ja, ich habe den tag reingeschrieben in jede html seite =O)
Ich hab’ auch schon bei SELFHTML geschaut bin aber nicht wirklich fündig geworden: Wie genau muss denn so eine .css datei aussehen? nur die styles oder ein davor? oder ist groß/kleinschreibung wichtig? Muss nach dem LETZTEN punkt vor einer geschweiften klammer zu ein semikolon stehen?
Im Internet gibt’s nämlich auch auf verschiedenen Webseiten verschiedene versionen von .css dateien, teilweise sogar extra für netscape und ie… wie mach ich das denn am besten? und welche browser können das dann verstehen?
hier mal ein meine .css, so wie sie im Moment aussieht (genauso sah sie damals auch aus, nur das ich sie etwas sortiert habe):
BODY {
FONT-SIZE: 9pt;
COLOR: #ffffff;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none;
scrollbar-face-color: #0099FF;
scrollbar-shadow-color: #005086;
scrollbar-highlight-color: #8BD1FF;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #1161BE;
scrollbar-track-color: #1161BE;
scrollbar-arrow-color: #ffffff;
}
A {
FONT-WEIGHT: bold;
FONT-SIZE: 9pt;
COLOR: #ff6600;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: bold;
FONT-SIZE: 9pt;
COLOR: #0066ff;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
A.special {
color:#7dc8ff;
text-decoration:none;
}
A.slink {
color:white
}
A.slink:hover {
text-decoration:underline;
color:#7dc8ff
}
A.special:hover {
color:white;
}
A.linkup {}
td {
FONT-SIZE: 9pt;
COLOR: #ffffff;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none
}
th {
FONT-SIZE: 10pt;
COLOR: #ffffff;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: bold
}
.black { COLOR: #000000 }
.gray { COLOR: #808080 }
.big { font-size:40pt }
.verybig { font-size:65pt; vertical-align:middle }
.lightblue { color:#7dc8ff; text-decoration:none }
.stylee {
font-family:verdana;
font-size:11px;
}
.desctut {
font-size:9px;
font-family:Verdana;
text-decoration:none;
color:white;
height:50;
width:165;
}
.tutorial {
font-size:11px;
font-family:Verdana;
text-decoration:none
}
.others {
font-size:12px;
font-weight:bold;
color:white;
}
.date {
color:#7dc8ff;
font-weight:300;
}
.indexbig {
FONT-WEIGHT: bold;
FONT-SIZE: 14pt;
COLOR: #ff6600;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none
}
.indexbig:hover {
FONT-WEIGHT: bold;
FONT-SIZE: 14pt;
COLOR: #0066ff;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.quick {
MARGIN-TOP: 30px; FONT-WEIGHT: 400; FONT-SIZE: 20px; COLOR: #0080ff; TEXT-ALIGN: left; TEXT-DECORATION: underline
}
.tip {
MARGIN-TOP: -12px; FONT-WEIGHT: 700; FONT-SIZE: 40px; MARGIN-LEFT: 40px; COLOR: #003f82; TEXT-ALIGN: left
}
.whitetip {
MARGIN-TOP: -12px; FONT-WEIGHT: 700; FONT-SIZE: 40px; MARGIN-LEFT: 40px; COLOR: #ffffff; TEXT-ALIGN: left
}
.whitetip:hover {
MARGIN-TOP: -12px; FONT-WEIGHT: 700; FONT-SIZE: 40px; MARGIN-LEFT: 40px; COLOR: #ffffff; TEXT-ALIGN: left; TEXT-DECORATION: underline
}
Danke schön!!! Und schönes Wochenende,
Dennis =O)