CSS Backgrounds and Images CSS background-repeat Property body { background-image:url('pattern.
gif'); background-repeat:repeat-y; } Definition and Usage The background-repeat property sets if/how a background image will be repeated. By default, a background-image is repeated both vertically and horizontally. Browser Support
The background-repeat property is supported in all major browsers. Note: The value "inherit" is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports "inherit". Tips and Notes Tip: The background image is placed according to the background-position property. If no background-position is specified, the image is always placed at the elements top left corner. Value repeat repeat-x repeat-y no-repeat inherit Description The background image will be repeated both vertically and horizontally. This is default The background image will be repeated only horizontally The background image will be repeated only vertically The background- image will not be repeated Specifies that the setting of the background-repeat property should be inherited from the parent element
All CSS Background Properties
background background-color background-image background-repeat
Fixed background image <style type="text/css"> body {
Sets all the background properties in one declaration Sets whether a background image is fixed or scrolls with the rest of the page
background-attachment
Sets the background color of an element Sets the background image for an element Sets the starting position of a background image
background-position
Sets how a background image will be repeated
background-image:url('pattern.gif'); background-repeat:no-repeat; background-attachment:fixed; } </style>