CSS right Property
To Specify the right offset of a positioned element
Definition and Notes.
1. The CSS right property defines the offset between the right outer margin edge of a positioned element and its containing block.
2. For elements positioned as absolute or fixed, it sets the distance between the right margin edge of the element and the right edge of its containing block.
3. For elements positioned as relative, it sets the distance the element is shifted above its initial position
CSS right property.
View in Splitscreen»
Code-Editor:Note-If the styled element is not within any positioned element, then the placement is relative to the right edge of the browser window.
|length||Sets the value in length units. Values can be positive, negative and null.|
|%||The values are specified as the percentage of containing block's width.|
|auto||Leaves it to the browser to calculate the position of the right edge|
|inherit||The values for the right offset is inherited from the parent elements value|
|Value||<length> <percentage> | auto|
|Applies to||Positioned Elements (i.e elements with position property other than static)|
|Computed Value||For relatively positioned elements, see description; for static elements, auto; for length values, absolute length; for percentage values, the value in percentages, or else, auto.|