CSS GUIDE BORDER-SPACING
This document is a work in progress and is subject to change.
Contents
Summary
The border-spacing property is used to set the distance between the borders of adjacent cells (only for the "separated borders" model).
Applicability: | The border-spacing property can be used for table and inline-table elements. | |
Media Group: | Visual | |
Inherited: | Yes | |
Default Value: | 0 |
Syntax
TARGET_ELEMENT{border-spacing: inhert !important} TARGET_ELEMENT{border-spacing: 20px}
Legal Values
Value | Description |
---|---|
inherit | Explicitly sets the value to that of the parent |
length | Sets the distance in pixels (px), centimeters (cm), etc. Units are optional. |
Mozilla Recommended Values
Usage Examples
table.space{ border: outset 5pt; border-spacing: 10pt; }
Notes
- The distance between the table border and the borders of the cells on the edge of the table is the table's padding for that side, plus the relevant border spacing distance. Ie. padding-left + horizontal border-spacing.
- The width of the table is the distance from the left inner padding edge to the right inner padding edge (including the border spacing but excluding padding and border). But in HTML and XHTML 1, the width of the table element is the distance from left border edge to right border edge.
Specification Conformance
- CSS 1
- CSS 2.1
- CSS 3
Browser Compatibility
- Netscape 6, 7
- Mozilla 1
- Firefox 1, 2
- Internet Explorer 7
- Opera 6, 7, 8
- Safari 1