Difference between revisions of "CSS GUIDE BACKGROUND POSITION"
(→Usage Examples) |
|||
Line 11: | Line 11: | ||
== Usage Examples == | == Usage Examples == | ||
+ | <pre>background-position: bottom right;</pre> | ||
+ | <pre>background-position: top right;</pre> | ||
+ | <pre>background-position: 20px 50px;</pre> | ||
+ | <pre>background-position: 50% 20%;</pre> | ||
+ | <pre>background-position: right 50%</pre> | ||
+ | <pre>background-position: 20% 50px;</pre> | ||
+ | <pre>background-position: right 20px;</pre> | ||
== Notes == | == Notes == |
Revision as of 02:34, 29 November 2006
This document is a work in progress and is subject to change.
Contents
Summary
Use the background-position property to specify where a background image is placed. If the image repeats (horizontally, vertically or both) then it repeats from this location. If there is a single image, it is placed using the background-position property.
Syntax
background-position: [left | right] [N% | Npx] [N% | Npx] [top | bottom];
Legal Values
Mozilla Recommended Values
Usage Examples
background-position: bottom right;
background-position: top right;
background-position: 20px 50px;
background-position: 50% 20%;
background-position: right 50%
background-position: 20% 50px;
background-position: right 20px;