column-span

  • Revision slug: CSS/column-span
  • Revision title: column-span
  • Revision id: 27883
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 15 words added, 13 words removed

Revision Content

{{ CSSRef() }}

Summary

The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element.

<style type="text/css"></style>
  • Initial: none
  • Applies to: in-float block-level elements, that is all block-level element that are not floating or absolutely positioned.
  • Inherited: no
  • Media: visual
  • Computed value: as specified

Syntax

column-span: none     or
column-span: all

where :

none
The element does not span multiple columns.
all
The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appears. The element establishes a new block formatting context.

Examples

h1, h2 {
  column-span: all;
}

Specifications

Specification Status Comment
CSS Multi-column Layout Module Level 3 {{ Spec2('CSS3 Multicol') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }} {{ CompatNo() }} 10 11.1+ {{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }} {{ CompatNo() }} {{ CompatUnknown() }} 11.1+ {{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}

See also

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>column-span</code> CSS property makes it possible for an element to span across all columns when its value is set to <code>all</code>. An element that spans more than one column is called a <strong>spanning element</strong>.</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>Initial:</dfn> <code>none</code></li> <li><dfn>Applies to:</dfn> in-float block-level elements, that is all block-level element that are not floating or absolutely positioned.</li> <li><dfn>Inherited:</dfn> no</li> <li><dfn>Media:</dfn> visual</li> <li><dfn>Computed value:</dfn> as specified</li>
</ul></nobr><h2 id="Syntax">Syntax</h2>
<pre class="eval">column-span: none     or
column-span: all
</pre>
<p>where :</p>
<dl> <dt style="margin-left: 40px;"><code>none</code></dt> <dd style="margin-left: 40px;"><span style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-size: medium; display: inline !important; float: none; ">The element does not span multiple columns.</span></dd> <dt style="margin-left: 40px;"><code>all</code></dt> <dd style="margin-left: 40px;">The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appears. The element establishes a new block formatting context.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre>h1, h2 {
  column-span: all;
}
</pre>
<h2 id="Specifications">Specifications</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/css3-multicol/#column-span0" title="http://www.w3.org/TR/css3-multicol/#column-span0">CSS Multi-column Layout Module Level 3</a></td> <td>{{ Spec2('CSS3 Multicol') }}</td> <td> </td> </tr> </tbody>
</table>
<h2 id="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 (WebKit)</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td> <td>{{ CompatNo() }}</td> <td>10</td> <td>11.1+</td> <td>{{ CompatVersionUnknown() }}{{ 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 Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatUnknown() }}</td> <td>11.1+</td> <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td> </tr> </tbody> </table>
</div>
<h2 id="See_also">See also</h2>
<ul> <li><a href="/en/CSS/CSS_Reference" title="CSS Reference">CSS Reference</a></li> <li>{{ CSS_Reference:Columns() }}</li>
</ul>
Revert to this revision