HTML DOM borderSpacing Property
Complete Style Object Reference
Definition and Usage
The borderSpacing property sets the distance between the borders of adjacent
cells (only for the "separated borders" model).
Syntax
Object.style.borderSpacing=length,length
|
Possible Values
| Value |
Description |
| length |
Defines the distance in px, cm, etc. If one length parameter is specified, it
defines the horizontal and vertical
spacing. If two length parameters are specified, the first sets the horizontal spacing
and the second sets the vertical spacing |
Example
The following example sets the distance between the borders of adjacent
cells:
<html>
<head>
<script type="text/javascript">
function changeBorderSpacing()
{
document.getElementById('myTable').style.borderSpacing="10px"
}
</script>
</head>
<body>
<table border="1" id="myTable">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<input type="button" onclick="changeBorderSpacing()"
value="Change border spacing">
</body>
</html>
|
Try-It-Yourself Demos
borderSpacing - Change the distance between the borders of adjacent cells
Complete Style Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
 |
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|