| Syntax | selector {right: value;}
|
|---|---|
| Usage | The right property is used to set the right side position of an element's box. This property can be used for elements that have a position property value of relative, absolute, or fixed. The right property is used as follows:
This property is specified by using a length, percentage, or keyword, according to the syntax shown above. If a percentage value is used, the value will be a percentage of the containing block's width. CSS Example: The right properties are set for 2 different elements which are using the relative and absolute position properties. #tst1 {position: relative; right: 40px;}
#tst2 {position: absolute; right: 40px;}![]() ![]() ![]() |
| Keywords |
|
| Applies To | Elements that have a position property value of relative, absolute, or fixed. |
| Inherited | No |
| Initial Value | auto |
![]() ![]() The right properties are set for 2 different elements which are using the relative and absolute position properties. |