..... If you are wearing Navy Blue Cotton Panties either you are a touch old fashioned, or these panties turn you on or you are probabley a School Girl or High School Girl, or perhaps you just like Navy Blue Panties!............
Ok.. so heres the important stuff: remember:
An ID Selector is only used Once for One element in a Document.
But a class selector does not have this restraint. Unlike an HTML Selector, See Knickers Twisted, which automatically targets a specific tag, a class is given a unique name that is then specified using the style attribute in the HTML tag or tags you want to use it in If this is not understood I wll try to make it clear on this page.
A help untwisting thouse tight knickers.. Generally An ID Selector will be used to help identify various items on a page such as say a box that is the main menu on a page, infact the menu for this page is created using an ID Selector. But Say you want to be able to alter the look of a specific tag( for example the paragraph tag), but at the same time you do not want to effect every single p tag on the whole Web Page... Well then a Class Selector might be a jolly good option. So what is the way you would do this, well it is a two step process. Firstly you need to define the class selector in the External style sheet,
Say something like this:
p.redspaced {background:#00FF00; color:#FF0000; font-style:italic;}
This is a Rule, infact a Class Selector, in this case a dependant Class Selector rule. it will only operate on p HTML Tags. Ok ... so thats the rule you place in the Style sheet, notice the structure. It is a little like an ordinary HTML rule but just a slight bit different.
So what to do to actually use this new style, well instead of writing an ordinary paragraph,<p>paragraph text</p> instead you write:
<p class="redgreen">This paragraph will be in this new class style</p>
There is one final thing that might just twist you up and make your eyes water, and that is that you can have two types of Class Selector, the one above the dependant class, or a simple class selector that is not dependant, this looks like this in the Style sheet:
.redspaced {background:#00FF00; color:#FF0000; font-style:italic;}
This second type still starts with a dot like the other type had near its beginning. The diffrence in how you write it is very subtle indeed and if you can not see the diffrence you will remain in an uncomfortable state...... If your still in a twist then you will have to refer to the Tight Leather Pants Page.