http://www.htmlgoodies.com/ Style Sheets? Cascading Style Sheets, or CSS? Any one. They all mean the same thing. I'll tell you what I really find funny. I had the original style sheets (usually called Explorer Style Sheets when referenced on other pages) up for six months when Netscape 4.0 came out. All of a sudden I was over run with letters asking me when I was going to put up a tutorial on Cascading Style Sheets and/or CSS even though they mean the same thing. Yet this pup had been sitting waiting all the time. I just hadn't updated the name to the new version. The term "Cascading" Style Sheets is used because more than one Style Sheet can affect the same page. For instance, if you are using a Style Sheet on the actual document, called an "in-line", and a style sheet that is being referenced by multiple pages, called a "span", both can have an effect on the items in the page. If both the in-line and the span Style Sheet are attempting to affect the same item, like an
. Make sure you use
Specify in inches (in), centimeters (cm), or pixels (px). o P {text-indent: 1in} 9. word-spacing o Denotes the amount of spaces between words. Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%). o P {word-spacing: 10px} 10. letter-spacing o Denotes space between letters. Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%). o P {letter-spacing: 2pt} 11. text-transform o Denotes a transformation of the text. Specify capitalize, uppercase, lowercase. o B {text-transform: uppercase} 12. color o Denotes color of text. See here for a few color codes. If you use the six digit hex codes, make sure you place a hash mark (#) in front. o H3 {color: #FFFFFF} 2. The MARGIN/BACKGROUND Commands Note! When used with the "BODY" tag these commands affect the entire page! 1. margin-left 2. margin-right 3. margin-top o Denotes space around the "page". Specify in points (pt), inches (in), centimeters (cm), or pixels (px). o BODY {margin-left: 2in} o P {margin-right: 12cm} o BODY {margin-top: 45px} 4. margin o Denotes all three margin commands above in one command. The pattern follows top, right, and then left. o P {margin: 3in 4cm 12px} (note no commas or semi-colons) 5. line-height o Denotes space between lines of text. Specify in points (pt), inches (in), centimeters (cm), or pixels (px), or percentage (%). o TEXT {line-height: 10px} 6. background-color o Denotes page's background color. Specify the color in hex or word codes, or use "transparant" o BODY {background-color: #ffffff} 7. background-image o Denotes the background image for pages. Specify the image you want through that image's URL. o BODY {background-image: http://www.page.com/dog.jpg} 8. background-repeat o Denotes how the image will tile. Specify repeat-x, repeat-y, or no-repeat. o BODY {background-repeat: repeat-y} 9. background-attachment o Denotes how the image will react to a scroll. Specify scroll, or fixed. o BODY{background-attachment: fixed} 3. The Positioning/Division Definitions: These commands come into play when you begin working with text and image positioning. Note these examples are given using a specific item. 1. position o Denotes the placement of an image or a division of the page. Specify absolute for specific placement, or relative for a relative placement to other images. o
2. left
o Denotes amount of space allowed from the left of the browser screen when positioning an item.
Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%).
o
3. top
o Denotes amount of space allowed from the top of the browser screen when positioning an item.
Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%).
o
4. width
o Denotes width of image or page division.
Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%).
o
5. height
o Denotes height of image or page division.
Specify in points (pt), inches (in), centimeters (cm), pixels (px), or percentage (%).
o
6. overflow
o If the item is too large for the height and width specified, this tells the page what to do with the overflow.
Specify visible, hidden, or scroll.
o
7. z-index
o Denotes an item's position in the layering structure. The lower the number, the lower the layer. An image marker with a 20 would go overtop of an image marked with a 10.
Specify by number.
o -
For a full list of Style Sheet Commands, visit either of thise great sites:
* C-Net's Table of Style Sheet Commands
* and there's always the World Wide Web Consortium's Style Site
What It All Looks Like
Here's the Style Sheet from this page:
What If I Want The Same Tag Handled Different Ways?
What you do it assign different "classes" of tags. Real simple. Look here:
H3.first {font-size: 20pt; color: #FF00FF}
H3.scnd {font size: 18pt; color #DD00FF}
See what I did? I labeled the H commands separately by adding a dot and then a suffix. I used "first" for the first type and "scnd" for the second type. You can use what ever you want. I like these determinants. When you place them on your page, you do this in the text: