Export (0) Print
Expand All
top
Expand Minimize
This topic has not yet been rated - Rate this topic

right

Sets the position of the object relative to the right edge of the next positioned object in the document hierarchy.

Syntax

{ right: sPosition }

Possible values

sPosition

Variant that specifies or receives one of the following values:

auto

Default. Default position, according to the regular HTML layout of the page.

length

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px).

For more information about the supported length units, see Length units reference.

percentage

Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.

This property has a default value of auto. It is not inherited.

Remarks

Only use the right property when the position property is set; otherwise, the value of the right property is ignored.

Example

This example uses the right property to set a DIV object 50 pixels from the right of the positioning context in which it resides:

<div style = "position:absolute; right:50px">
. . .
</div>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Ee371204.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, hn, hr, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

See also

Concepts

position

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.