[Previous] [Contents] [Next]
Cascading Style Sheets
I mentioned earlier that XSL1 improved on XS by adding features from CSS. XSL1 adopted some of the CSS properties as flow objects (you will learn all about these on Day 19). This was intended to make it easier for people to convert CSS style sheets into XSL style sheets, not just by converting code but also by being able to keep to the same concepts.
| There are two versions of CSS: CSS level 1 (CSS1), which is a W3C recommendation dating from December 1996, and CSS level 2 (CSS2), which was published as a proposal in November 1997 and currently exists in the form of a working draft dating from January 1998. As yet, few Web browsers actually support the latest version of CSS (quite a few have problems supporting the older version) and so I will only deal with CSS1 here. CSS2 adds a lot of extra features, but it is backward compatible with CSS1. |
|
I'm not going to teach you CSS here. There are plenty of excellent books covering CSS, but there are also literally hundreds of tutorials available on the Web and thousands of sample pages for you to learn from.
|
Using other peoples' HTML and CSS code is theft. However, no one can really blame you for examining code in order to learn from it.
An easy way to download the CSS code is to use an old version of a Web browser. Netscape 2 or even Mosaic is a good choice, but you want to make sure that it's a version that doesn't support CSS style sheets. When you see a style sheet that looks interesting in your regular Web browser, check the HTML source code (use View > Page Source in Netscape, or View > Source in Internet Explorer) for the address of the style sheet (look in the META tags at the start of the document). Cut the address of the style sheet, fire up the old version of the browser, and paste that address into the URL box (don't forget to add the path to the original document and resolve any relative paths). You should see the contents of the style sheet displayed as plain ASCII text and you can save the file to your hard disk.
|
|
| When you use a second browser you must be careful to avoid DLL or other conflicts. You can destroy your bookmarks or favorites and even seriously damage your preference settings. If you use a really old version you probably won't have any problems, but you should consider setting up separate profiles for the two versions. |
|
[Previous] [Contents] [Next]