Tipps und Tricks: Verkürzte Farbangaben
Farben werden in CSS u.a. in hexadezimaler Form nach folgender Syntax angegeben:
#rrggbb
. rr
steht für ein Wertepaar für Rot,
gg
für Grün und bb
für Blau.
Sind nun die beide Ziffern eine Paares gleich, brauchst du nur eine anzugeben:





<style type="text/css"> /* Rot */ .rot{color:#ff0000;} oder .rot{color:#f00;} /* Blau */ .blau{color:#0000ff;} oder .blau{color:#00f;} /* Grün */ .gruen{color:#00ff00;} oder .gruen{color:#0f0;} </style>
Siehe auch: Farben richtig angeben