'padding-top' Example : padding top « CSS « HTML / CSS

HTML / CSS » CSS » padding top 
'padding-top' Example
  
    
<html>
<body>
<table>
    <tr>
        <td id="myTd">
            <img src="http://www.java2s.com/style/logo.png" 
                 height="50" 
                 width="50" 
                 border="1">
        </td>
    </tr>
</table>
<button onclick="myTd.style.paddingTop=0">Set padding to 0</button>
<button onclick="myTd.style.paddingTop=20">Set padding to 20</button>
</body>
</html>

    
      
        
    
  
Related examples in the same category
1.padding-top: 2px
2.padding-top: 2px;
3.Set padding top to 45px
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.