Reply to Re: class vs. style

Your name:

Reply:


Posted by Roy A. on 01/20/07 19:26

Ben C skrev:

> > According to these rules, putting these classes in a certain order in
> > the stylesheet doesn't make sense. By using an element name before the
> > pseudo-class, e.g. a:active, would ensure that this style take
> > precedence. But, is there any default cascading order for these
> > classes? I suspect it is vendor specific.
>
> It's all specified, see 6.4.1. You sort by origin, then by specificity,
> and finally by the order in which they appeared. There should be always
> one and only one right answer for what styles an element should get from
> the cascade.

Ah, I see. Given <a href="#">link</a> and

:active { color: black } :hover { color: lime }

the latter wins.

Similarly. Given <td class="no_left_border left_border"> and

..left_border {border-left: 1px solid}
..no_left_border {border-left: 0px solid}

the latter (in the stylesheet) wins.

Now it make sense to me to.

[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

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