:: code war·ri·or                    
                   

Text & Colour Properties

TEXT-DECORATION

This property allows you to underline or strike-through your text. The settings are NONE, UNDERLINE and LINE-THROUGH. The following code allows you to remove the underlining from links:

A { TEXT-DECORATION: NONE }

TEXT-TRANSFORM

Set TEXT-TRANSFORM to one of the following:

  • UPPERCASE Converts all characters to uppercase.
  • LOWERCASE Converts all characters to lowercase.
  • CAPITALIZE Capitalize the first letter of each work.
  • NONE Leave characters as in the source document.

TEXT-ALIGN

Fairly self-explanatory this one. The options are LEFT, CENTER, RIGHT or JUSTIFY, although justify does not always work in Netscape.

COLOR

Allows you to specify a colour for an element, given as a standard hex code:

ELEMENT { COLOR: #FF0000 }

BACKGROUND-COLOR

You may like to use the property with the BODY element to specify a background colour for your page. Alternatively you can set background colours for text elements to give a highlighting effect. As always, specify the colour of your choice with a hex code.

BACKGROUND-IMAGE

Again this is commonly used with the background element, but can be applied to other elements as well for slightly flashier sites.

ELEMENT { BACKGROUND-IMAGE: URL(back.gif) }

Place the path to your image in the brackets.

BACKGROUND-REPEAT

This property controls the tiling of your background image. The setting is REPEAT or NO-REPEAT - pretty obvious what each does isn't it?

You can also set images to tile in one direction only by setting the property to REPEAT-X (for horizontal tiling) or REPEAT-Y (for vertical). Note that these settings do not always work in Netscape.


· code-warrior
· HTML Tutorials
· CSS


Quick Links
· Introduction to CSS
· CSS Coding
· Notes
· Font Properties
· Text & Colour Properties
· List Properties



SHOP
· Books @ Amazon
· Software @ Amazon

Please send any comments to
This HTML guide is a free resource
© Code Warrior 2002

  

:: made on a mac