PDA

View Full Version : which should be the winner?


el pendejo
07-13-2005, 07:34 PM
p.bla {

color: 333;

}

h2, p {

color: 666;

}

-----------------------------------------------------

<h2> blablabla bla<\h2>

<p class"bla">blabla bli blo blu<\p>


bli blu blablibla ba<\p>
<p class"bla">tadddaaammmm!<\p>






i m new let's see if i m right:

h2= will be 666 color
1st p= will be 333
2nd= will be 666
3rd= will be 333


If there 's more P with a class and less P with just a color will it make's it more specific and then becoming the winner?

take it easy on me!
thanks

domedia
07-13-2005, 10:23 PM
Yes this is right :)
Remember to use '#' ahead of colors in your style. (#333)

A class will override because it's more specific.

h2= will be 666 color
1st p= will be 333
2nd= will be 666
3rd= will be 333