This document is a work in progress and is subject to change.
Summary
The left proprighterty is used to horizontally offset from the right edge of an element.
Applicability: | The right property can be used for all CSS elements. | |
Media Group: | Visual | |
Inherited: | No | |
Default Value: | auto |
Syntax
TARGET_ELEMENT{right: inhert !important} TARGET_ELEMENT{right: auto} TARGET_ELEMENT{right: 20%} TARGET_ELEMENT{right: 20px}
Legal Values
Value | Description |
---|---|
inherit | Explicitly sets the value to that of the parent |
auto | Allows the browser to calculate the right position of the element |
percentage | Sets the right position in a percentage from the right edge. Can be 0%-100% |
length | Sets the right position in pixels (px), centimeters (cm), etc, from the right edge. |
Mozilla Recommended Values
Usage Examples
p{ position: absolute; right: 20px } img{ position: absolute; right: 15% } div{ position: absolute; right: auto }
Notes
When right property is used with the position property, if the position property has a value of "static", the right property has no effect on the element.
Specification Conformance
- CSS 1
- CSS 2.1
- CSS 3