CSS Styling
Styling Backgrounds
The shorthand property for background is background. Example:
{background:#ffffff url('img_tree.png') no-repeat right top;}
Styling Text
Background color corresponds to a HEX value like ʻ#ff0000ʼ,
an RGB value like ʻrgb(255,0,0)ʼ or a color name like “red”.
Example: div {background-color:#b0c4de;}
To set background image, do
body {background-image:url(ʻT.gifʼ);} where T is name of pic
To repeat vertically, do background-repeat:repeat-y;
To repeat horizontally, do background-repeat:repeat-x;
For no repeat, do background-repeat:no-repeat;
For an image that scrolls with rest of page, do
background-attachment:scroll;
For a fixed image, do
background-attachment:fixed;
To position background do, “background-position: X Y;”
where X can be left, right or center and Y can be top, bottom
or center. Example: background-position: right top;
To change the font color, add command “color: some color;”
where “some color” is a HEX value, RGB value or name.
Example: div {color:#b0c4de;}
To align text to left, do text-align:left
To align text to right, do text-align:right
To center text, do text-align:center
To stretch the lines so that each line has equal width, do
text-align:justify
To add line below text, do text-decoration:underline
To add line above text, do text-decoration:overline
To add strikethrough, do text-decoration:line-through
Example: text-decoration:overline;