Name
right — NN n/a IE n/a CSS 2
Synopsis
Inherited: No
For positionable elements, defines the position of the right edge of an element box (content plus padding, border, and/or margin) relative to the right edge of the next outermost block content container. When the element is relative-positioned, the offset is based on the right edge of the inline location of where the element would normally appear in the content.
CSS Syntax
right:length|percentage| auto
Value
See the discussion about length values at the beginning of this
chapter. Negative lengths may be allowed in some contexts, but be
sure to test the results on all browsers. You may also specify a
percentage value, which is calculated based on the width of the next
outermost container. The setting of auto lets the
browser determine the right offset of the element box on its
naturally flowing offset within the containing box.
Initial Value
auto
Applies To
All elements.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access