column-count

  • Revision slug: CSS/column-count
  • Revision title: column-count
  • Revision id: 361271
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}}

Summary

The column-count CSS property describes the number of columns of the element.

{{cssbox("column-count")}}

Syntax

Formal syntax: {{csssyntax("column-count")}}
column-count: 3
column-count: auto

Values

auto
Is a keyword indicating that the number of columns should be determined by other CSS properties, like {{cssxref("column-width")}}.
<number>
Is a strictly positive {{xref_cssinteger}} describing the ideal number of columns into which the content of the element will be flowed. If the {{cssxref("column-width")}} is also set to a non-auto value, it merely indicates the maximum allowed number of columns.

Examples

.content-box {
  border: 10px solid #000000;
  column-count:3;
}

Specifications

Specification Status Comment
{{SpecName('CSS3 Multicol', '#column-count', 'column-count')}} {{Spec2('CSS3 Multicol')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}}{{property_prefix('-webkit')}} 1.5 (1.8){{property_prefix('-moz')}} 10 11.1 3.0 (522){{property_prefix('-webkit')}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • {{CSS_Reference:Columns}}

Revision Source

<div>
  {{CSSRef}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>column-count</code> CSS property describes the number of columns of the element.</p>
<p>{{cssbox("column-count")}}</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("column-count")}}
</pre>
<pre>
column-count: 3
column-count: auto</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>auto</code></dt>
  <dd>
    Is a keyword indicating that the number of columns should be determined by other CSS properties, like {{cssxref("column-width")}}.</dd>
  <dt>
    <code>&lt;number&gt;</code></dt>
  <dd>
    Is a strictly positive {{xref_cssinteger}} describing the ideal number of columns into which the content of the element will be flowed. If the {{cssxref("column-width")}} is also set to a non-<strong>auto</strong> value, it merely indicates the maximum allowed number of columns.</dd>
</dl>
<h2 id="Examples" name="Examples">Examples</h2>
<pre class="brush: css">
.content-box {
  border: 10px solid #000000;
  column-count:3;
}
</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('CSS3 Multicol', '#column-count', 'column-count')}}</td>
      <td>{{Spec2('CSS3 Multicol')}}</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 (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td>
        <td>1.5 (1.8){{property_prefix('-moz')}}</td>
        <td>10</td>
        <td>11.1</td>
        <td>3.0 (522){{property_prefix('-webkit')}}</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>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul>
  <li>{{CSS_Reference:Columns}}</li>
</ul>
Revert to this revision