border-spacing
CSS border-spacing Property
The CSS border-spacing property is used to set the amount of space inside of table borders.
Example: "16px"
em unit relative sizing
Example: "1.5em"
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
#table1 {
border:orange 4px solid;
border-spacing: 8px;
}
#table2 {
border:orange 4px solid;
border-spacing: 24px;
}
table td { border:orange 2px solid; }
</style>
<table id="table1">
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
</table>
<hr />
<table id="table2">
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
</table>
<style type="text/css">
#table1 {
border:orange 4px solid;
border-spacing: 8px;
}
#table2 {
border:orange 4px solid;
border-spacing: 24px;
}
table td { border:orange 2px solid; }
</style>
<table id="table1">
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
</table>
<hr />
<table id="table2">
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
<tr>
<td>Cell data</td>
<td>Cell data</td>
</tr>
</table>
Cell data | Cell data |
Cell data | Cell data |
Cell data | Cell data |
Cell data | Cell data |
Possible Values:
Pixel sizeExample: "16px"
em unit relative sizing
Example: "1.5em"
0 Response to "border-spacing"
Post a Comment