Continued from page 1
< link rel="STYLESHEET" type="text/css" href="mystyle.css" rel="nofollow" >
It is now easy to change background image or color of your site by simply changing variables in stylesheet. You can also change how text in your in your website looks Anything in "P" tags on your web pages takes on "P" attributes specified in stylesheet. The above will make your pages display Verdana text (and you give option of Helvetica and sans-serif in case your visitor's computer does not support first choice) which is 12 pt and navy.
The next source of confusion is use of CLASS attribute. But this is also real easy and very powerful. It is best explained by adding another style to our stylesheet explained above.
P.redtext { FONT-FAMILY: Verdana, Helvetica, sans-serif; FONT-SIZE: 12pt; COLOR: red }
Now what this allows you to do is make certain blocks of text red. In your web pages, instead of a simple "P" tag around your text, you would add class="redtext" to "P" tag and text inside tags would be red.
You can have any number of classes and assign classes not only to P tags, but also to your table data TD, your links "A" and any tag contained in "BODY" of your web pages. And by simply changing stylesheet you can change look of your whole site. Are you beginning to see power of using style?
It is however important to realize Netscape and Internet Explorer deal with stylesheets differently and Netscape does not support them as fully as IE. Netscape basically takes inheritance a step too far. The only way to find out what goes and what doesn't is by trial and error, however there are a couple of resources which will help you a long way with understanding more about stylesheets. We have listed links to these resources at http://www.thewebseye.com/stylesheets.htm.
With simple stylesheets you should have no problem and they will really help to make sure your site keeps a certain amount of uniformity and cohesion.
Richard Igoe - http://www.TheWebsEYE.com. Get his latest Free Website Success Course by sending a blank email to mailto:wsc@quicktell.net and find out whether you have the 6 essentials of a successful site!