Background Properties

Background color - The background-color property sets the background color of an element.
{ background-color: #222222; }
Value Description
color Specifies the background color, can use hex code, #EEE0B7 or the color's name, red.
transparent Specifies that the background color should be transparent. This is by default!

Background image - The background of an element is the total size of the element, including padding and border (but not the margin).
{ background-image: url ('URLHERE'); }

Background attachment - The background-attachment property sets whether a background image is fixed or scrolls with the rest of the page.
{ background-attachment:fixed; }

Value Description
fixed The background is fixed with regard to the viewport

Background repeat - The background repeat property sets how a background image will be repeated.
{ background-repeat: no-repeat; }
Value Description
repeat The background image will be repeated both vertically and horizontally.
repeat-x The background image will be repeated only horizontally.
repeat-y The background image will be repeated only vertically.

Background position - This background position property sets the position of a background image.
{ background-position: center; }
Value Description
left top
left center
left bottom
right top
right center
right bottom
center top
center center
center bottom
If you only specify one keyword, the other value will be "center"

Border Properties

Border styles - This property sets the border's style of the selected element.
{ border-style: solid; }
* Can alternate with colors!

Value Description
Specifies a solid, dotted, dashed and double border respectivly.
Specifies a 3D grooved, ridged, inset, and outset border respectively.

A dotted border.

A dashed border.

A solid border.

A double border.

A groove border.

A ridge border.

An inset border.

An outset border.


Sample Text
Basic Style Codes
Textarea #2
Side by Side DIVs
Fixed DIV Box
Decorated Bulleted List
Fitted Bottom Bar
Dropdown Menu
Class DIV Boxes
Backgrounds in Navigation
Table ID
Table Cells


font stacks



Backgrounds Borders Codes Texts