CSS Background Property

Posted The: 23/04/2008 At: 21:51

Last Edited: 15/08/2008 At: 18:49

The background property sets the background for a given element, in one declaration.

Possible Values

Using this property, you can specify both the background-color, background-image, background-attachment, and background-position.

To understand the many different values for color, Cunsult the Reference entry on Colors

body {
  background: red url("MyBackground.png") fixed no-repeat top left;
}

Which is the equivalent of:

body {
  background-color: red;
  background-image: url("MyBackground.png");
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: top left;
}

Inherited? - NO!

Comments: [0]

© Brugbart Webdesign