|
div id vs class
I have just started getting into CSS layouts and was wondering something...
is it better to use div IDs or classes? I have been using IDs because thats what some of the training material I read used. Is it better to use just one of them or is a mix fine?
ex:
<div id="content_main"> </div>
using css:
div#content_main {
margin:0;
padding:0;
}
would it be better to do:
<div class="content_main"> </div>
using css:
.content_main {
margin:0;
padding:0;
}
|