Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
background-attachment
background-color
background-image
background-position
background
PROPERTY: background-repeat
background-repeat
:
repeat
|
repeat-x
|
repeat-y
|
no-repeat
Compatibility:
IE4+ N4+
Version:
Level 1
Inherited:
No
The
background-repeat
property allows you to repeat a background image vertically and/or horizontally. The repetition of an image is called tiling.
repeat
The
repeat
value causes the background image to be tiled both vertically and horizontally.
repeat-x
The
repeat-x
value causes the background image to be tiled horizontally (along the x-axis).
repeat-y
The
repeat-y
value causes the background image to be tiled vertically (along the y-axis).
no-repeat
The
no-repeat
value is the default. No tiling occurs. By declaring
no-repeat
, you can ensure that any previous declaration will not effect a specific imaged.
Code:
body {
background: url("images/aardvark.gif");
background-repeat: repeat;
}
pre {
background: url("images/aardvark.gif");
background-repeat: repeat-x;
}
menu {
background: url("images/aardvark.gif");
background-repeat: repeat-y;
}
p {
background: url("images/aardvark.gif");
background-repeat: no-repeat;
}
Output:
Click to see example in separate window
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information