HighDots Forums  

'div id' vs 'div class'

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss 'div id' vs 'div class' in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dr. zoidberg
 
Posts: n/a

Default 'div id' vs 'div class' - 04-13-2004 , 01:51 PM






hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..>

TNX

Reply With Quote
  #2  
Old   
Jakob
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-13-2004 , 02:27 PM







"dr. zoidberg" <zoi (AT) example (DOT) org> schreef in bericht
news:c5h9b0$1i4fc$1 (AT) ID-93631 (DOT) news.uni-berlin.de...
Quote:
hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

TNX
You know about usenet,
you know enough about CSS to ask this question in this newsgroup
but you don't know where or how to find an answer????

Jakob






Reply With Quote
  #3  
Old   
Michael Ramey
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-13-2004 , 02:39 PM



http://www.yourhtmlsource.com/styles...tml#CLASSESIDS

"dr. zoidberg" <zoi (AT) example (DOT) org> wrote

Quote:
hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

TNX



Reply With Quote
  #4  
Old   
Spartanicus
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-13-2004 , 02:48 PM



"dr. zoidberg" <zoi (AT) example (DOT) org> wrote:

Quote:
can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..
http://www.w3.org/TR/html401/struct/global.html#h-7.5.2

--
Spartanicus


Reply With Quote
  #5  
Old   
Mark Johnson
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-13-2004 , 11:29 PM



Spartanicus <me (AT) privacy (DOT) net> wrote:

Quote:
"dr. zoidberg" <zoi (AT) example (DOT) org> wrote:

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
As ever, W3C is always confusing.

"Note that the French "msg1" and the English "msg1" may not appear in
the same document since they share the same id value. Authors may make
further use of the id attribute to refine the presentation of
individual messages, make them target anchors, etc."

Etc? And whether or not they'd wish it, politics aside, the very
example, above, suggests it's in the very self-same document. What the
authors of these mean, and what they write, are often not the same.
They can be very specific, even pedantic, in explaining things on ngs.
I've seen that in other areas. But the documents tend to be almost
written in a shorthand, with much consistency and detail omitted.

And yet aren't these the norms, supposedly, for criticisms of IE, and
even NN (if anyone still uses it), for not being 'standards
compliant'?

Take the pre.example. It's described this way:

"The document is to include a number of preformatted examples. We use
the PRE element to format the examples. We also assign a background
color (green) to all instances of the PRE element belonging to the
class "example". "

What they really mean is that:

One given document might include more than one PRE section. Any of
these can present a green background, if we associate that section
with a certain CLASS; which we called, "example", in this example.

And I'm confused, as well, why W3C doesn't use lower case for XHMTL?
It's the particular version they can call their own.

Anyway.





Reply With Quote
  #6  
Old   
Neal
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-13-2004 , 11:40 PM



On Tue, 13 Apr 2004 20:29:19 -0700, Mark Johnson
<102334.12 (AT) compuserve (DOT) com> wrote:

Quote:
"Note that the French "msg1" and the English "msg1" may not appear in
the same document since they share the same id value. Authors may make
further use of the id attribute to refine the presentation of
individual messages, make them target anchors, etc."

Etc? And whether or not they'd wish it, politics aside, the very
example, above, suggests it's in the very self-same document. What the
authors of these mean, and what they write, are often not the same.
They can be very specific, even pedantic, in explaining things on ngs.
I've seen that in other areas. But the documents tend to be almost
written in a shorthand, with much consistency and detail omitted.
In this case, I'd look at the example as faulted, and instead hold to the
basic concept of only one instance of id="foo" in a single document. All
the remaining text follows this concept - especially what immediately
folows the example, "Note that the French "msg1" and the English "msg1"
may not appear in the same document." This clearly says that the above
example cannot appear as is in an HTML document.

Quote:
Take the pre.example. It's described this way:

"The document is to include a number of preformatted examples. We use
the PRE element to format the examples. We also assign a background
color (green) to all instances of the PRE element belonging to the
class "example". "

What they really mean is that:

One given document might include more than one PRE section. Any of
these can present a green background, if we associate that section
with a certain CLASS; which we called, "example", in this example.
Yes. And we can further style the specific example using its unique id.

Quote:
And I'm confused, as well, why W3C doesn't use lower case for XHMTL?
It's the particular version they can call their own.
The given reference is to HTML 4.01, not XHTML. In the XHTML specs, I am
pretty sure they routinely use lowercase for element tags.


Reply With Quote
  #7  
Old   
MasonC
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-14-2004 , 12:58 AM



On Tue, 13 Apr 2004 19:51:34 +0200, "dr. zoidberg" <zoi (AT) example (DOT) org> wrote:

Quote:
hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

Use "id" for things that happen only *once*
Use "class" for those that happen *more than once*

Mason C



Reply With Quote
  #8  
Old   
MasonC
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-14-2004 , 01:00 AM



On Tue, 13 Apr 2004 20:27:34 +0200, "Jakob" <acc_kats (AT) hotmail (DOT) com> wrote:

Quote:
"dr. zoidberg" <zoi (AT) example (DOT) org> schreef in bericht
news:c5h9b0$1i4fc$1 (AT) ID-93631 (DOT) news.uni-berlin.de...
hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

TNX

You know about usenet,
you know enough about CSS to ask this question in this newsgroup
but you don't know where or how to find an answer????

This poster make me think of George W. Bush. If you don't have
the answer, filibuster.

Mason C
Quote:




Reply With Quote
  #9  
Old   
Spartanicus
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-14-2004 , 03:04 AM



Mark Johnson <102334.12 (AT) compuserve (DOT) com> wrote:

Quote:
http://www.w3.org/TR/html401/struct/global.html#h-7.5.2

As ever, W3C is always confusing.

And yet aren't these the norms, supposedly, for criticisms of IE, and
even NN (if anyone still uses it), for not being 'standards
compliant'?
The HTML spec is pretty sloppy compared to the more properly defined css
spec. But the criticism often levied against IE mainly concerns css
compliance. IE's html compliance is not significantly worse than other
UAs afaik.

--
Spartanicus


Reply With Quote
  #10  
Old   
Jakob
 
Posts: n/a

Default Re: 'div id' vs 'div class' - 04-14-2004 , 02:48 PM




"MasonC" <masonc (AT) ix (DOT) netcom.xyz.com> schreef in bericht
news:s8hp701nike35urvrb8rvk3eujhhu9cj24 (AT) 4ax (DOT) com...
Quote:
On Tue, 13 Apr 2004 20:27:34 +0200, "Jakob" <acc_kats (AT) hotmail (DOT) com> wrote:


"dr. zoidberg" <zoi (AT) example (DOT) org> schreef in bericht
news:c5h9b0$1i4fc$1 (AT) ID-93631 (DOT) news.uni-berlin.de...
hello,

can anyone tell me or direct me where can I find explanation about
difference between <div id=..> and <div class=..

TNX

You know about usenet,
you know enough about CSS to ask this question in this newsgroup
but you don't know where or how to find an answer????

This poster make me think of George W. Bush. If you don't have
the answer, filibuster.

Mason C

I'm not a CSS-expert, I'm still learning.
And one of the best ways to do that (for me at least) is to follow this
newsgroup
and I read books and magazines.

Maybe I wasn't in the best of moods this morning,
maybe I should've just kept my mouth closed (and my fingers away from the
keys)
but I........
oh well, forget it.

I'm sorry if I offended anyone
and I appologize for my rude behaviour.

*But don't ever compare me to G.W*

Jakob




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.