Reply to Re: Lists with multiple styles

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация