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

Home
HTML CSS Reference
1.CSS Attributes and Javascript Style Properties
2.HTML Attributes Reference
3.HTML Tag Reference
HTML CSS Reference » CSS Attributes and Javascript Style Properties » left 
'left' 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 left property to 100
       onclick="myImg.style.left=100">

<input type="button
       value="Set left property to 200
       onclick="myImg.style.left=200">

<input type="button
       value="Restore image position
       onclick="myImg.style.left=0">
</body>
</html>

    
      
      
Related examples in the same category
1.'left' Syntax and Note
2.'left' Possible Values
3.'left' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.