Definition

The background-repeat property sets if/how a background image will be repeated.

Inherited: No
JavaScript Syntax

CSS properties can also be dynamically changed with a JavaScript.

Scripting Syntax: object.style.backgroundRepeat="repeat-y"

In our HTML DOM tutorial you can find more details about the backgroundRepeat property.

In our HTML DOM tutorial you can also find a full Style Object Reference.
Example:
body
{
background-image: url(stars.gif);
background-repeat: repeat-x
}




You can also use no-repeat in order to use an image in a div and layer it with another image or text.

Example:
#header {
background-image:url(header.png);
background-repeat:no-repeat;
width:700px;
height:300px;
}


Page Information

  • 10 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts