Cyx23: OL-Liste mit CSS formatieren

Beitrag lesen

Hallo Messmar,

Ich habe z.B. eine Liste mit Nummern (list-style-type: decimal), und diese Nummer sollen rot sein.

<ol> darfs auch sein?

Netscape 4 kanns schon lange, und mit Mozilla klappts auch recht
einfach, nur Opera und IE scheinen doch ein span o.ä. zu benötigen,
bzw. für IE ist auch eine etwas unschöne Notlösung möglich:

<style type="text/css">
ol {color:black}
li{color:red}
* ol {color:red;}
* li:first-line { color:black;}
* html li:first-letter{color:red;}
</style>
<ol>
<li>Punkt</li>
<li>Punkt</li>
</ol>

Grüsse

Cyx23