Class or IDs
Posted 28 December 2008 - 10:01 AM
Posted 28 December 2008 - 10:32 AM
It's not a matter of opinion - that is the proper, intended use. IDs for anything that only shows up once, and classes for stuff that's used more than once - on any given page (not site).
I'm sure the others will have differing opinions....
Posted 28 December 2008 - 11:22 AM
For instance, I might have a header, a navbar, a content area, and a sidebar on a site. Each of those divs would have an ID, and everything under it would have either a class, or nothing. I would assign another id if I had a discrete content object - like a Coda slider, or something.
Posted 28 December 2008 - 12:45 PM
what is a Coda slider?
As most people are saying, I usually organize my code something like this:
The main divs that stay consistent on every page use id's, and anything inside those main divs use classes.
Posted 28 December 2008 - 08:30 PM
IDs may only exist once on a page. Classies can be used often on a page.
Thank You, Migwetth, Gunalche’esh, Ha’w'aa, Danke
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users