Absolute Versus Relative Linking in Web Sites
What is an absolute link? What is a relative link? Why should
you care which one you use? When it comes to how you set up the
links on your web site, it's important to use an absolute link
(which means that when you link to another page on...
So, You Want Your Own Website? Is Free Or Paid Hosting Right For You?
You have made the decision to build a website! Good for you. Whether you are simply looking for a way to show off your family, to try your hand at making money from an affiliate program or to go into a full-fledged business, your first decision is...
Website Templates
Website Templates
Looking to establish an online presence? Then, your most affordable solution is to buy a web template. It is important to determine what kind of templates are there in the market before you proceed to but one. The following is...
YOUR FIRST HTML PAGE - II
In the book, "The Agony and the Ecstasy", I read that Michael Angelo dug up graves in order to study the human anatomy in all its gory manifestation. He used to hold the internal organs in his bare hands. He came up with masterpieces. The same is...
YOUR FIRST HTML PAGE - IV
In the preceding sections, you learnt how to come up with an elementary HTML page. You learnt the tags that are the backbone of an average HTML page, namely, , , , , and . Assuming you could assimilate the gushing fountain of...
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
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