Posted by Jukka K. Korpela on 11/21/06 16:49
Scripsit Bubu:
> It's possible to make an unordered list with different styles for
> every li?
Surely. Why not? Anything that constitutes an element is styleable.
> In other words I need to make:
>
> <ul class="ulclass">
> <li class="liclass-1"></li>
> <li class="liclass-1"></li>
> <li class="liclass-2"></li>
> <li class="liclass-3"></li>
> </ul>
Yes? Your problem with that is exactly what? Apart from the issue of
inventing better class names, maybe.
You can even do things without class attributes for <li> elements if you
are willing to accept the situation that old browsers like IE 6 won't apply
all of your styles. You can say, for example,
..ulclass li:first-child+ li + li { font-weight: bold; }
to make the third item in the list bolded.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|