mozilla

Revision 494143 of empty-cells

  • Revision slug: Web/CSS/empty-cells
  • Revision title: empty-cells
  • Revision id: 494143
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

{{CSSRef("CSS Tables")}}

Summary

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

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

Syntax

Formal syntax: {{csssyntax("empty-cells")}}
empty-cells: show
empty-cells: hide

empty-cells: 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

.contentbox td {
  empty-cells: show;
}

Specifications

Specification Status Comment
{{SpecName('CSS2.1', 'tables.html#empty-cells', 'empty-cells')}} {{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}}

Revision Source

<div>
 {{CSSRef("CSS Tables")}}</div>
<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>
<p>{{cssbox("empty-cells")}}</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("empty-cells")}}
</pre>
<pre>
empty-cells: show
empty-cells: hide

empty-cells: inherit</pre>
<h3 id="Values" name="Values">Values</h3>
<dl>
 <dt>
  <code>show</code></dt>
 <dd>
  Is a keyword indicating that borders and backgrounds should be drawn like in a normal cells.</dd>
 <dt>
  <code>hide</code></dt>
 <dd>
  Is a keyword indicating that no border or backgrounds should be drawn.</dd>
</dl>
<h2 id="Examples" name="Examples">Examples</h2>
<pre class="brush: css">
.contentbox td {
  empty-cells: show;
}
</pre>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS2.1', 'tables.html#empty-cells', 'empty-cells')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<div>
 {{CompatibilityTable}}</div>
<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>
Revert to this revision