asp.net.ph

Skip Navigation Links

right Attribute | right Property

Language References


Sets or retrieves the object’s position relative to the right edge of the next positioned object in the document hierarchy.

Syntax


CSS { right: 'auto' | length | percentage }
Script object.style.right [ = sRight ]

Possible Values


auto Default position according to the regular HTML layout of the page.
length Floating-point number and a valid CSS length unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ).
percentage Value expressed as a percentage of the parent object’s height.

The property is read/write with a default value of auto; the cascading stylesheet ( CSS ) attribute is not inherited.

Remarks

This property is used with the position attribute.

When scripting the right property, use either the pixelRight or posRight property for numeric manipulation of a right value.

For more information about how to access the dimension and location of objects on the page through the document object model, see Measuring Element Dimension and Location.

Example

The following sample demonstrates the use of the right attribute to set a DIV object 50 pixels from the right of the client area.

<div STYLE = "position:absolute; right:50px">
. . .
</div>
See Also

pixelRight, posRight



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note