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






'position' Example

    
<head>
<script language="JavaScript">
    function function1(){
        myDiv.style.position = "absolute"; 
    }
</script>
</head>
<body>
<br>
<br>
<br>
<br>
<br>
<div id="myDiv" 
     style="background-color:#ccffcc; 
            width:300; 
            cursor:hand" 
     onclick="function1()">
     Click Here to set the position to absolute
</div>
</body>

    
      
      








Related examples in the same category

1.'position' Syntax and Note
2.'position' Possible Values
3.'position' is applied to