Search
Recommended Products
Related Links


 

 

Informative Articles

CSS: The Basics - ID's and Classes ... Correct
Css Cascading Style Sheets Two types of style sheets: Internal and External Internal - You insert your style code right into your html code. These stylesheets should only be used if you are intending to create a specific page with a specific...

Goofy Mistakes that Hurt Your Search Engine Rankings
One thing is for sure, you don't want to spend hours, perhaps days, months, or years on a website to have some stupid little mistake get your site dropped or never even listed in the search engines. There are a lot of rules that search engines have...

How To Design Your Web Site With CSS
Cascading Style Sheets (CSS) allows you to create fast loading pages, increase your search engine rankings, and modify your whole site with one style sheet. So why don’t more people use them? This is because they got so used to html design and are...

The Top 20 Things You Can Do to Make Your Website Accessible
In 1990, the Americans with Disabilities Act was passed by Congress. The law was designed to protect people with disabilities from being discriminated against, because of a physical or mental disability. The act was put into place to help guarantee...

The Top 5 Roadblocks To Web Accessibility
Introduction Accessibility is often the last thing on a web designer's mind when creating a website. This is not a trait unique to newbies or people working on a personal page. It is also a trait common to professional web designers (large...

 
Google
CSS: The Basics - ID's and Classes

Css

Cascading Style Sheets

Two types of style sheets: Internal and External

Internal - You insert your style code right into your html code.
These stylesheets should only be used if you are intending to
create a specific page with a specific style. If you want to be
able to make global changes to your website using only one style
sheet, you have to use....

External Stylesheets - Instead of putting all the style code into
your html code, you can create a single document with your css
code and link to it within your webpages code. It would look
something like this


Webpage title< itle>
href="http://www.yourdomain.com/css">


If you decide to use an internal stylesheet, you have to put your
css style wihin the following tags:



All css or links to the external stylesheets have to go in
between the tags

Now about Css Classes vs. ID's

The one major difference between a class and an id is that
classes can be used multiple times within the same page while an
Id can only be used once per page.

Example:

ID - The global navigation of your site, or a navigation bar. A
footer, header, etc. Only items that appear in only one place
per page.

Class - Anything that you would use multiple times in your page,
such as titles, subtitles, headlines, and the like.

Creating ID 's

To create an Id in your css, you would start with the number sign
(#) and then your label of the id. Here's an example

#navigation {
float:left;
}

To insert the id in your html, you would do something like this