'pixelLeft' Example : pixelLeft « CSS Attributes and Javascript Style Properties « HTML CSS Reference






'pixelLeft' Example

    
<html>
<head>
<script language="JavaScript">
    function function1(){
        document.all.myDiv.style.pixelLeft = 500; 
    } 
</script>
</head>
<body>
<div id="myDiv" 
     style="background-color:#ccffcc; 
            position:absolute; 
            width:300;
            cursor:hand"; 
     onclick="function1()">
     Click to send it to 500 px from the left.
</div>
</body>
</html>

    
      
      








Related examples in the same category

1.'pixelLeft' Syntax and Note
2.'pixelLeft' is applied to