Quote:
Originally Posted by hobnail
It seems to me that I could instead use
Code:
div.poem, div.letter, div.telegram, etc. {
/* common block stuff here */
}
div.poem {
/* poem specific stuff here */
}
I don't know if one is better than the other.
|
That's the technique I use, but I don't enumerate the common block selectors:
Code:
div {
/* common block stuff here */
}
div.poem {
/* poem specific stuff here */
}
div.letter {
/* letter specific stuff here */
}
div.news {
/* news article specific stuff here */
}
div.email {
/* email specific stuff here */
}
As long as the common stuff is listed first, any specific changes listed below have priority. It may not be 'better' but it makes the code a little simpler/shorter... I don't need to see the word 'block' on every div...I already know it's a block because it's in a div tag.