javascriptrightproperty


  Translation results:

英[raɪt] 美[raɪt]

adv. Immediately, right away; to the right, right; appropriately; all the time

adj. Correct; appropriate; right; Good, normal

n.right;right;correct,just;right hand

vt.correct;straighten,make right;arrange;compensate

vi.( ship, etc.) to be restored to stability

Third person singular: rights Plural: rights Present participle: righting Past tense: righted Past participle: righted

javascriptrightpropertysyntax

Function: Set the offset between the right margin boundary of the positioned element and the right boundary of its containing block.

Syntax: Object.style.right=auto|%|length

Comments: If the value of the "position" attribute is "static" , then setting the "right" property will have no effect.

javascriptrightpropertyexample

<html>
<head>
<style type="text/css">
input
{
position:absolute;
}
</style>
<script type="text/javascript">
function setRightEdge()
{
document.getElementById("b1").style.right="100px";
}
</script>
</head>
<body>

<input type="button" id="b1" onclick="setRightEdge()"
value="Set right edge to 100 px" />

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A