Open main menu

CDOT Wiki β

Changes

CSS GUIDE BORDER-SPACING

2,126 bytes added, 23:48, 11 December 2006
no edit summary
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
== Summary ==
The border-spacing property is used to set the distance between the borders of adjacent cells (only for the "separated borders" model).
<table border="0">
<tr>
<td><b>Applicability:</b></td><td>The border-spacing property can be used for table and inline-table elements.<td>
</tr>
<tr>
<td><b>[http://developer.mozilla.org/en/docs/CSS:%40media#Media_groups Media Group:]</b>
</td><td>Visual</td>
</tr>
<tr>
<td><b>Inherited:</b></td><td>Yes</td>
</tr>
<tr>
<td><b>Default Value:</b></td><td>0</td>
</tr>
</table>

== Syntax ==
<pre>
TARGET_ELEMENT{border-spacing: inhert !important}
TARGET_ELEMENT{border-spacing: 20px}
</pre>

== Legal Values ==
<table border="1" cellspacing="2" cellpadding="5">
<tr>
<th align="left">Value</th><th align="left">Description</th>
</tr>
<tr>
<td>inherit</td><td>Explicitly sets the value to that of the parent</td>
</tr>
<tr>
<td>length</td><td>Sets the distance in pixels (px), centimeters (cm), etc. Units are optional.</td>
</tr>
</table>

== Mozilla Recommended Values ==

== Usage Examples ==
<pre>
table.space{
border: outset 5pt;
border-spacing: 10pt;
}
</pre>

== 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
*[http://www.w3.org/TR/REC-CSS2/tables.html#propdef-border-spacing CSS 2.1]
*CSS 3

== Browser Compatibility ==
* Netscape 6, 7
* Mozilla 1
* Firefox 1, 2
* Internet Explorer 7
* Opera 6, 7, 8
* Safari 1

== See Also ==
1
edit