navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

ID Selector

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> ID Selector
Page: [1]
 
enrightd

 

Posts: 1031
Joined: 12/5/2001
From: Rock Hill SC USA
Status: offline

 
ID Selector - 10/22/2003 16:43:38   
quote:


The id Selector
The id selector is different from the class selector! While a class selector may apply to SEVERAL elements on a page, an id selector always applies to only ONE element.


Why, When, and Where would I want to use and ID Selector.

_____________________________

Thanks,
Dan

I wonder how much deeper the ocean would be without sponges
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: ID Selector - 10/22/2003 17:00:06   
quote:

ORIGINAL: enrightd

quote:


The id Selector
The id selector is different from the class selector! While a class selector may apply to SEVERAL elements on a page, an id selector always applies to only ONE element.


Why, When, and Where would I want to use and ID Selector.


Since I am just learning all of this, does it make a difference? ID seems so confusing, still, to me, though I think I might be getting a grasp on it.

Are there instances where the id is really necessary? OR can you just use a class?

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to enrightd)
gorilla

 

Posts: 2974
From: Denmark
Status: offline

 
RE: ID Selector - 10/22/2003 18:13:41   
ID selectors are a very similar to class selectors, they work in a very similar way, their syntax is also very similar.

The most important difference is that while class selectors apply to one or more elements on a page, ID selectors apply to exactly one element and one element only.

Consider that you wish to have several different link styles one horizontal and one vertical. For navigation bars you might wish to have radically different styling for horizontal and vertical nav bar links. You could set up classes. But it makes more sense to set up ids and only use class for common elements.

They are also often used for setting up boxes in layouts.

There is quite a good lesson on it here:

http://codepunk.hardwar.org.uk/acss06.htm

I suggest that you read all the way through to lesson 8 on this. The examples are very clear. and may give you an idea or two :-)

Jesper Berendtsen
Gorilla Group

(edited to correct my spelling!)

< Message edited by gorilla -- 10/23/2003 10:19:17 AM >


_____________________________

Mháircaish

Signature self-censored to protect the sensibilities of the thin-skinned :).

May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower



(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: ID Selector - 10/22/2003 20:43:08   
Jesper:
Thanks for your information.

I'm going there now!

btw, welcome.:)

<edit>WOW, great site! Thanks sooo much for the link!!!</edit>

< Message edited by c1sissy -- 10/22/2003 9:41:43 PM >


_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to gorilla)
enrightd

 

Posts: 1031
Joined: 12/5/2001
From: Rock Hill SC USA
Status: offline

 
RE: ID Selector - 10/23/2003 15:00:27   
Jesper:

Thanks, That lesson was very helpful and makes sense.

_____________________________

Thanks,
Dan

I wonder how much deeper the ocean would be without sponges

(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: ID Selector - 10/23/2003 23:42:22   
I just have to let you know how THRILLED!! I am with this link!

I hve printed the whole section on advanced CSS and am reading thorugh it now. After I read it I'll play with the styles as I read it again.

This is totally exciting! I'm actually grasping the IDs!!!

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to enrightd)
gorilla

 

Posts: 2974
From: Denmark
Status: offline

 
RE: ID Selector - 10/24/2003 1:36:16   
It is a good site and a good course. We often send people that link. I am pleased that you find it useful.

JB.

Note to anyone considering CSS but a little nervous about learning a new way of doing things- the intrdouctory course on that site is excellent also.

_____________________________

Mháircaish

Signature self-censored to protect the sensibilities of the thin-skinned :).

May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower



(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: ID Selector - 10/24/2003 7:41:51   
quote:

ORIGINAL: gorilla

It is a good site and a good course. We often send people that link. I am pleased that you find it useful.

JB.

Note to anyone considering CSS but a little nervous about learning a new way of doing things- the intrdouctory course on that site is excellent also.


I was up until about 1am reading the material that I printed out on this site. There are several things in the intro course that I plan on printing out as well.

I would higly recomend this site to everyone.:)

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to gorilla)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> ID Selector
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts