border-spacing

border-spacing

CSS border-spacing Property
The CSS border-spacing property is used to set the amount of space inside of table borders.
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>
 
Cell dataCell data
Cell dataCell data

Cell dataCell data
Cell dataCell data

Possible Values:

Pixel size 
Example: "16px"

em unit relative sizing
Example: "1.5em"


Related Properties

border-collapse

0 Response to "border-spacing"

Post a Comment