CSS GUIDE BORDER-SPACING

From CDOT Wiki
Revision as of 23:53, 11 December 2006 by SaraM (talk | contribs) (See Also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document is a work in progress and is subject to change.

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

ValueDescription
inheritExplicitly sets the value to that of the parent
lengthSets 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

Browser Compatibility

  • Netscape 6, 7
  • Mozilla 1
  • Firefox 1, 2
  • Internet Explorer 7
  • Opera 6, 7, 8
  • Safari 1

See Also