empty-cells

  • Revision slug: CSS/empty-cells
  • Revision title: empty-cells
  • Revision id: 27216
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 5 words removed

Revision Content

{{ CSSRef() }}

Summary

The empty-cells CSS property specifies how user agent should render borders and backgrounds around cells that have no visible content.

<style type="text/css"></style>
  • {{ Xref_cssinitial() }}: show
  • Applies to: 'table-cell' elements
  • {{ Xref_cssinherited() }}: yes
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: as specified

Syntax

empty-cells: show | hide | {{ Cssxref("inherit") }}

Values

show
Is a keyword indicating that borders and backgrounds should be drawn like in a normal cells.
hide
Is a keyword indicating that no border or backgrounds should be drawn.

Examples

{{ CSSRefExampleLink("empty-cells") }}

.contentbox td {
  empty-cells: show;
}

Specification

Specification Status Comment
CSS 2.1 {{ Spec2('CSS2.1') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{ CompatGeckoDesktop("1.0") }} 8.0 4.0 1.2
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1 {{ CompatGeckoMobile("1.0") }} 8 6 3.1

See also

  • Other table-related CSS properties: {{ CSS_Reference:Table_Properties() }}

{{ languages( {"de": "de/CSS/empty-cells", "fr": "fr/CSS/empty-cells"} ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>empty-cells </code>CSS property specifies how user agent should render borders and backgrounds around cells that have no visible content.</p>
<nobr>
<style type="text/css"><![CDATA[.cssprop {
  display:table;
  padding: 0.4em;
  border-left:0.15em solid;
  background-color:#eeeeff
}
.cssprop li {
 display:table-row;
 padding: 3px;
 margin:0;
}
.cssprop li dfn {
  display:table-cell;
  padding: 0 5px;
  border-bottom: none;
  cursor:inherit;
}

]]></style>
<ul class="cssprop"> <li><dfn>{{ Xref_cssinitial() }}:</dfn> <code>show</code></li> <li><dfn>Applies to:</dfn> 'table-cell' elements</li> <li><dfn>{{ Xref_cssinherited() }}:</dfn> yes</li> <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li> <li><dfn>{{ Xref_csscomputed() }}:</dfn> as specified</li>
</ul></nobr><h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="eval syntaxbox">empty-cells: show | hide | {{ Cssxref("inherit") }}</pre>
<h3 id="Values" name="Values">Values</h3>
<dl> <dt>show</dt> <dd>Is a keyword indicating that borders and backgrounds should be drawn like in a normal cells.</dd> <dt>hide</dt> <dd>Is a keyword indicating that no border or backgrounds should be drawn.</dd>
</dl>
<h3 id="Examples" name="Examples">Examples</h3>
<p>{{ CSSRefExampleLink("empty-cells") }}</p>
<pre class="eval">.contentbox td {
  empty-cells: show;
}
</pre>
<h2 id="Notes" name="Notes">Specification</h2>
<table class="standard-table"> <thead> <tr style="background-color: rgb(255, 204, 255);"> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td><a class="external" href="http://www.w3.org/TR/CSS21/tables.html#empty-cells" title="http://www.w3.org/TR/CSS21/tables.html#empty-cells">CSS 2.1</a></td> <td>{{ Spec2('CSS2.1') }}</td> <td> </td> </tr> </tbody>
</table>
<h2 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>1.0</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>8.0</td> <td>4.0</td> <td>1.2</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>1</td> <td>{{ CompatGeckoMobile("1.0") }}</td> <td>8</td> <td>6</td> <td>3.1</td> </tr> </tbody> </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul> <li>Other table-related CSS properties: {{ CSS_Reference:Table_Properties() }}</li>
</ul>
<p>{{ languages( {"de": "de/CSS/empty-cells", "fr": "fr/CSS/empty-cells"} ) }}</p>
Revert to this revision