CSS:right
From MDC
[edit] Summary
The right property specifies part of the position of positioned elements.
For absolutely positioned elements (those with position: absolute or position: fixed), it specifies the distance between the right margin edge of the element and the right edge of its containing block.
- Initial value:
auto - Applies to: positioned elements
- Inherited: no
- Percentages: refer to height of containing block
- Media:
visual - Computed value: absolute length, percentage, or auto
[edit] Syntax
right: <length> | <percentage> | auto | inherit ;
[edit] Values
-
<length> - A length, can be negative, zero, or positive.
-
<percentage> - A percentage of the containing block's width.
[edit] Examples
View Live Examples (FIXME)
div {
position: absolute;
right: 20px;
height: 200px;
border: 1px solid #000;
}
[edit] Notes
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | ? |
| Firefox | 1 |
| Netscape | ? |
| Opera | ? |
| Safari | ? |