Here we are going to look briefly, at StyleSheets. Why briefly? Well several reasons: The first and most important, out of all the browsers that I have used, ONLY Internet Explorer 4.0+ fully supports, or at least appears to fully support the CSS 1.2 specification. Second Netscape does not use the full Cascading StyleSheets object model.
The final reason is that, well, to be honest I am not so sure about using these. Yes I am using them on my website, but this is more of an experiment than anything else. Right now I am also playing around with Macromedia Flash 4, so expect at some point to see some Flash 4 modules! Anyway, back to the StyleSheets...
Stylesheets were first suggested as a layout method for the HTML version 3.0 specification. At that time, May 1995, HTML v3 was deemed to be too ambitious. So, HTML v3 was past over to a modified version, 3.2 with less emphasis on stylesheets. But of course things never run smoothly in the world of computing. Within a year or so, stylesheets HAD been implemented... well, sought of, implemented into both Netscape Navigator and Internet Explorer. Why sought of? Well, it was a more than a little ropey in those early days. Of course with further revisions and enhancements to the web browsers stylesheets were eventually included.
It is at this point were I sadly have to leave Netscape behind. The reason is simple, the browser Navigator just does not implement the stylesheets properly. I am not sure what the problems are, or if there are work arounds. All I know is that if I view these pages under Netscape, then half the effects don't work! Especially the Hyperlink highlighting. As more and more websites are now using stylesheets for major page layout control, it is high time for the standard (That was agreed by MS and Netscape!!) to be used properly!
This page will deal briefly with using the STYLE tag, and with how to use externally linked stylesheets. It must be said now, that stylesheets are best edited using a text editor, and especially one that DOES support the tags. So all those thinking that Notepad will do, it is time to get Homesite v4 or a similar package! This page also makes use of 'pop-up' help windows to help further explain the tags.
The STYLE Attribute
The first section of stylesheets I am going to look at is the STYLE element. This tag is useful for including styles within documents. The attribute STYLE can be used within other tags. This operates differently to the first style. Within IE4+ it can be used with most major tags such as the IMG, A (anchor), FONT, P and all lists (UL, OL, DL etc). As you can see it is a very powerful tag, especially when you consider what can be done with it! The benefit of using the style attribute is that it will override any other settings that have been set using either stylesheets or a style setting inside the HEAD tags. Right, back to the STYLE Element!
The style element sits in the top part of a HTML page called the HEAD (see above link). The tag is made up of two sections, the <STYLE> opening statement and, the corresponding </STYLE> closing statement. Inbetween the tags several settings can be made, as well as defining a style to be used for the page.
This is the end of the help pages. Watch out for more information coming soon!