Color and Background

background

This property is a shorthand method of specifying values for the five background properties. The five values should be separated by a sapce. The order of the values is not important but it is recommended to follow the order of color, image, repeat, attachment, position. Note that if you do not specify one of this values, the browser will use the default value for missing property.

Example

background: #FFFF33 url(background.jpg) no-repeat fixed left top;

Browser support

IE5.5+, FF1+, SA1.3+, OP9.2+

Values

bottom Bottom position value.
center Center position value.
Color keyword One of the 17 recognized color keywords; aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white and yellow.
em Relative length value. A em unit is equal to the font-size value of the element used.
fixed Locks the image in place.
Hex color Three two-character numbers in the hexadecimal system(base 16)
left Left side value.
no-repeat Displays the image only once.
Percentage value The regular format of a percentage value.
px Pixel, a pixel unit represents a single dot on the screen.
repeat Default value, tiles the image.
repeat-x Repeats the image from left to right.
repeat-y Repeats the image from top to bottom.
RGB decimal Use RGB values from 0 to 255; rgb(255, 0, 333).
RGB percentage Specify a color using percentage values: rgb(100%, 0%, 33%).
right Right position value.
scroll Normal behavior, the image will scroll along with the text.
top Top position value.
transparent Sets no color value.
URI values Including URLs, URNs, etc.. e.g. url(images/background.jpg);

Related properties

Can be used with..

Search the Soup!