UK[pəˈzɪʃn] US[pəˈzɪʃən]

n. Position, direction; status, position; attitude; state

vt. Place; put... in the appropriate position; position... ;Garrisoned troops

Third person singular: positions Plural: positions Present participle: positioning Past tense: positioned Past participle: positioned

javascript position property syntax

Function:Place the element into a static, relative, absolute, or fixed position.

Syntax: Object.style.position=static|relative|absolute|fixed

javascript position property example

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

<p>This is an example paragraph</p>
<p>This is an example paragraph</p>

<input type="button" id="b1" onclick="setPositionAbsolute()"
value="Set button position to be absolute" />

</body>
</html>

Run instance »

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