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






'padding-left' 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.paddingLeft=0">Set padding to 0</button>
<button onclick="myTd.style.paddingLeft=20">Set padding to 20</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'padding-left' Syntax and Note
2.'padding-left' Possible Values
3.'padding-left' is applied to