[thelist] CSS etiquette question

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jan 10 09:25:50 CST 2002


>Just a little question of neatness and etiquette...
>If I have two <div> tags on a particular page type template which i'm going 
>to hold some text, and which always need to be distinguished from one 
>another, which of the following would be the best way to style them up:
>
>1) make a #rule for each div, matching their ids, containing all their
>layout/positioning AND font styles (because they'll be different colours)
>
>or
>
>2) make a . rule for each contining the same as the #rule
>
>or
>
>3) make a . and a # splitting up "style" in the . rule and "layout" in the 
>#?

Certainly not #3, if they are of equal stylistic importance you should the 
same to both.

In general, if I wanted to do some DHTML with the DIVs I'd give them an ID, 
if it's purely a matter of style I'd give them a CLASS.

ppk

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx





More information about the thelist mailing list