Difference between revisions of "CSS GUIDE BACKGROUND-POSITION-X"

From CDOT Wiki
Jump to: navigation, search
(Usage Examples)
(Usage Examples)
Line 52: Line 52:
 
== Usage Examples ==
 
== Usage Examples ==
  
div.marked {background-image: url(watermark.jpg);
+
div.marked {background-image: url(watermark.jpg);
    background-position-x: center}
 
  
 
== Notes ==
 
== Notes ==

Revision as of 14:42, 13 December 2006

Summary

Establish the location of the left (x) with the background-image attribute.

Inherited: No
Initial Value 0%

Syntax

background-position-x: [percentage | length] | [left | center | right ]

Legal Values

Value Description
percentage percentage of the block level element
length length values (in the unit of measure that best suits the medium
left aligns object to the left on the x - axis
centre aligns object to the centre on the x - axis
right aligns object to the right on the x - axis

Mozilla Recommended Values

Usage Examples

div.marked {background-image: url(watermark.jpg);

Notes

Specification Conformance

CSS1 Conformance:

Browser Compatibility

Browser Compatibility: IE 4+ / NN 4+

See Also

Border Style Cascade Style Sheets Properties