kim holder kim holder - 1 year ago 80
CSS Question

Can an element have both an id and a class?

pretty self-explanatory.

Answer Source

Yes, an element can have one ID (which must be unique!) and multiple classes at the same time. To have multiple classes, use a space between them, here's an example:

<div id="myID" class="class1 class2 class3">Content</div>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download