'margin' Example : margin : CSS Attributes and Javascript Style Properties HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Attributes and Javascript Style Properties » margin »

 

'margin' Example



    
<html>
<body>
<img id="myImg" 
     src="http://www.navioo.com/style/logo.png" 
     height="100" 
     width="100" 
     border="1">
     
<button onclick="myImg.style.margin='25 25 25 25'">25 Px Margin</button>

<button onclick="myImg.style.margin='0 0 0 0'">Margin</button>

</body>

</html>

    
      
      



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Attributes and Javascript Style Properties
» margin