Style borderSpacing Property
- Nakaraang Pahina borderRightWidth
- Susunod na Pahina borderStyle
- Bumalik sa nakaraang Lebel Object Style ng HTML DOM
Definition and Usage
borderSpacing
Sets or returns the space between cells in the table.
Note:If borderCollapse is set to collapse
If both are specified, this property is invalid.
See also:
CSS Tutorial:CSS Table
CSS Reference Manual:border-spacing property
Instance
Example 1
Set the spacing between cells in the table:
document.getElementById("myTable").style.borderSpacing = "20px";
Example 2
Return the space between cells in the table:
alert(document.getElementById("myTable").style.borderSpacing);
Syntax
Return borderSpacing property:
object.style.borderSpacing
Set borderSpacing property:
object.style.borderSpacing = "length length|initial|inherit"
Property Value
Value | Description |
---|---|
length length |
Specify the spacing between cells in length units. Negative values are not allowed. The default value is 0. If only one length value is specified, both horizontal and vertical spacing are set at the same time. If two length values are specified, the first sets the horizontal spacing, and the second sets the vertical spacing. |
initial | Sets this property to its default value. See initial。 |
inherit | Inherits this property from its parent element. See inherit。 |
Technical Details
Default value: | 0 |
---|---|
Return value: | String that represents the space between cells in the table. |
CSS Version: | CSS2 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Suporta | 9.0 | Suporta | Suporta | Suporta |
- Nakaraang Pahina borderRightWidth
- Susunod na Pahina borderStyle
- Bumalik sa nakaraang Lebel Object Style ng HTML DOM