Padding means the space between the elements border and elements content. The negative values are not allowed.
Property | Description | Values | CSS |
Padding | A shorthand property for setting all the padding properties in one declaration | padding-top padding-right padding-bottom padding-left | 1 |
padding-bottom | Sets the bottom padding of an element | Length % | 1 |
padding-left | Sets the left padding of an element | length % | 1 |
padding-right | Sets the right padding of an element | length % | 1 |
padding-top | Sets the top padding of an element | length % | 1 |
Example
<html>
<head>
<style type=”text/css”>
.test
{
padding-right:20%;
padding-top:20%;
}
</style>
</head>
<body>
<center>
<table cellpadding="0" cellspacing="0" border="1" >
<tr>
<th class="test">Subject List</th>
</tr>
<tr>
<td>PHP</td>
</tr>
<tr>
<td>SAD</td>
</tr>
<tr>
<td>Vb</td>
</tr>
<tr>
<td>C++</td>
</tr>
</table>
</center>
</body>
</html>
No comments:
Post a Comment