HighDots Forums  

CSS-P ... ID tags and Class tags?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS-P ... ID tags and Class tags? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
limeybloke
 
Posts: n/a

Default CSS-P ... ID tags and Class tags? - 07-06-2004 , 08:52 AM






Can anyone please tell me what the difference is between a ID tag and a class
tag? And why and when you should be using them?

As i understand it, a class tag is identified in the css with:
..nameofclass

and an ID is identified in the css with #nameofid


is this right? And why would you use one instead of the other?

Hope someone can help!



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

Default Re: CSS-P ... ID tags and Class tags? - 07-06-2004 , 08:55 AM






limeybloke wrote:

Quote:
As i understand it, a class tag is identified in the css with:
.nameofclass.and an ID is identified in the css with #nameofid is this right?
Yes.



And why would you use one instead of the other?


a class can be used multiple times on your page to attach to any amount
of elements/containers such a <table> <div> <p> <a> tags etc.

An id can only be used once. There should be no repetion of this on your
page.



Reply With Quote
  #3  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: CSS-P ... ID tags and Class tags? - 07-06-2004 , 08:56 AM



limeybloke typed:
Quote:
Can anyone please tell me what the difference is between a ID tag and
a class tag? And why and when you should be using them?

As i understand it, a class tag is identified in the css with:
.nameofclass

and an ID is identified in the css with #nameofid


is this right? And why would you use one instead of the other?

Hope someone can help!


See if this helps explain things a bit better than I could in a couple of
sentences

http://www.mako4css.com/BasClass.htm


--
Nadia
-----------------
*Free Templates *Dropdown Menu Templates*
http://www.DreamweaverResources.com
*Templates - HTML and CSS Validated *
*Free Nav Bar Sets*
*Resources : Ecommerce : SEO Articles*
-----------------




Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: CSS-P ... ID tags and Class tags? - 07-06-2004 , 03:27 PM



.oO(limeybloke)

Quote:
Can anyone please tell me what the difference is between a ID tag and a class
tag?
I can tell you what they have in common: Both don't exist! Surprised?

ID and class are _attributes_. A tag is something like <p>, <ul>, <kbd>
etc. (start tags) or </em>, </abbr>, </li> etc. (end tags).

That's an important difference, especially if you talk about things like
the title-element, the title-attribute or the <title>-tag.

Mi'nitpicking'cha


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 - 2009, Jelsoft Enterprises Ltd.