|
HTML DOM cellPadding Property
Complete Table Object Reference
Definition and Usage
The cellPadding property sets or returns the amount of space (in pixels) between the cell
border and the cell content.
Syntax
|
tableObject.cellPadding=pixels
|
Example
The following example changes the cell padding of a table:
<html>
<head>
<script type="text/javascript">
function padding()
{
document.getElementById('myTable').cellPadding="15"
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<br />
<input type="button" onclick="padding()" value="Change Cellpadding">
</body>
</html>
|
|
Complete Table Object Reference
729,913 sites built with Wix. Make your own
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|