Help > Pages > Cascading Style Sheets | email help@skyBuilders.com |
Copy and paste these lines immediately after the <title> tag in the <head> section of your document.
<link rel="stylesheet" href="http://www.yourdomain.com/yourstylesheet.css">
<style type="text/css">
h2, h3, h4 {
color:#660000;
}
</style>
The first line creates a <link> to an external style sheet that can be anywhere on the web (if you provide an absolute link).
The <style> tags override the definitions for h2,h3, and h4 in the external style sheet. This overriding is why style sheets are called "cascading" (CSS). These style rules are said to be "embedded" in your web page. Embedded style sheets come second in the cascade after external style sheets (and inline style rules come third).
We provide a css page with examples of many style rules. You can copy this whole document and paste it into a draft external style sheet, or you can copy style rules selectively and paste them into your embedded styles area.
Styles in the <style> tags override external styles, and if you should have inline styles written as attributes in any tags), these would override both external styles and embedded styles in the head of the page.
An inline style rule in a paragraph tag would look like
<p style="margin-left: 10px; margin-top: 20px;">
If you want to support Netscape 4, you will need a separate stylesheet for N4, and then you need to override all its conflicting rules with appropriate rules for IE. Here's how - add the following @import line to your embedded style sheet:
<link rel="stylesheet" href="http://www.yourdomain.com/yourNN4stylesheet.css">
<style type="text/css">
@import url(http://www.yourdomain.com/yourstylesheet.css);
h2, h3, h4 {
color:#660000;
}
</style>
Copyright © 2002 skyBuilders.com, Inc.
77 Huron Avenue, Cambridge, MA 02138 617-876-5680