उदाहरण
left प्रॉपर्टी से पोज़िशन्ड एलिमेंट (absolute, relative, fixed) की बाईं स्थिति सेट करें।
<!DOCTYPE html>
<html>
<head>
<style>
#myID {
position: absolute;
}
</style>
</head>
<body>
<h1>हेडिंग 1</h1>
<p>यह डेमो टेक्स्ट है।</p>
<button type="button" id="myID" onclick="display()">बाईं स्थिति बदलें</button>
<script>
function display() {
document.getElementById("myID").style.left = "150px";
}
</script>
</body>
</html>
आवश्यक: एलिमेंट का position static (डिफ़ॉल्ट) नहीं होना चाहिए।