Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS id or class?

Reply
Thread Tools

CSS id or class?

 
 
mark | r
Guest
Posts: n/a
 
      01-19-2004
am i correct in that ID can only be used for one element and that class is
to be used for multiple elements needing a collective style?

i am confused!

mark


 
Reply With Quote
 
 
 
 
Lauri Raittila
Guest
Posts: n/a
 
      01-19-2004
In article mark | r wrote:
> am i correct in that ID can only be used for one element


Yes. Other thing is that if you have id, you can link directly to the
element.

> and that class is
> to be used for multiple elements needing a collective style?


Yes, but of course you can use it for just one element too.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

 
Reply With Quote
 
 
 
 
Disco Octopus
Guest
Posts: n/a
 
      01-19-2004
in news:400baada$0$27800$(E-Mail Removed) ,
mark | r typed:
> am i correct in that ID can only be used for one element


yes.


> and that
> class is to be used for multiple elements needing a collective style?
>


yes.


> i am confused!


you underestimate yourself.



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
confused - html validates, css validates but validate css from the html causes errors Titus A Ducksass - AKA broken-record HTML 6 11-15-2004 12:59 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
print.css and screen.css tom watson HTML 1 09-09-2003 02:48 PM



Advertisments