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






'right' Example

    
<html>
<body>
<p>
<img id="myImg" 
     src="http://www.java2s.com/style/logo.png" 
     width=74 
     height=100" 
     style="position:relative">
</p>
<input type="button" 
       value="Set right property to 100" 
       onclick="myImg.style.right=100">
       
<input type="button" 
       value="Restore image position" 
       onclick="myImg.style.right=0">
</body>
</html>

    
      
      








Related examples in the same category

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