Andy Dingley wrote:
On 2 Jun, 13:36, shapper <mdmo...@gmail.comwrote:
><div id="intro" class="Intro">Some intro text</div>
Should I use a class:
.Intro {...}
Or:
#Intro {...}
Select on the class. (Fairly) commonly discussed issue in this ng.
This doesn't affect the HTML though, it's quite reasonable to use both
in the document markup.
Is that really the consensus here?
I don't see any hard and fast rules for naming conventions (aside
from only one ID per page).
I like to name these things to increase readability. If I assign an
ID to something, I know that it is a section of the page. Classes I
reserve for presentation issues. Others are more comfortable with
everything as a class.
I'm happiest with stylesheets that have almost no classes, with nearly
everything styled as a descendant of a section.
Jeff