Wow thanks for the great responses people!
Love this list :)
Cheers, solved all my problems with that question :)
Paul Novitski wrote:
At 06:23 PM 1/12/05, Chris Stratford wrote:
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
Just wondering.
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
I know why classes are good!
What is the advantage of an ID over simply giving something an ID??
I know these facts,
Only 1 usage per ID per page...
Classes are
IDs have higher specificity is another.
You can link/anchor to them that way.
Cheers
Jeff
On 13/1/05 1:23 PM, Chris Stratford [EMAIL PROTECTED] wrote:
Just wondering.
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
I know
BTW I know IDs are needed for LABELS and other FORM elements.
:)
Cheers
Chris Stratford wrote:
Just wondering.
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
I know why classes are good!
What is the advantage of an ID over
Stratford
Sent: Wednesday, January 12, 2005 9:23 PM
To: WSG
Subject: [WSG] Class -vs- ID
Just wondering.
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
I know why classes are good!
What is the advantage of an ID over simply giving
Chris Stratford wrote:
What is the advantage of an ID over simply giving something an ID??
No measurable advantage, but it's a question of principle and
appropriateness: if something is unique (e.g. your page will only ever
have one header, footer, main navigation bar, content area, etc), then
Chris Stratford wrote:
What is the advantage of an ID over simply giving something an ID??
Besides the benefits of greater CSS selector specificity than classes
and its use as a target for URLs, ids also convey a semantic value which
is different than a class and can be referred to via
What is the advantage of an ID over simply giving something an ID??
My explanation for the existance of IDs in CSS is simply that if IDs
are there to be used in HTML, then they need to be there in CSS too.
In other words, if you're sitting there with your own HTML document
and you're wondering
At 06:23 PM 1/12/05, Chris Stratford wrote:
I was asked for the first time yesterday, what the big difference and
advantage to using an ID over a CLASS was...
Chris,
With regard to our intentions as scripters, what you and everyone else has
said applies: ids are unique, classes are generic, and