Template:Column-width/doc
{{#if: |
{{#if:x||
}} |{{#ifeq: doc | doc
|
{{
#ifeq: show | show
| {{
{{#switch:
{{#if:
|
| {{#if:
|
{{#ifeq:|
| talk
|
}}
|
{{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main | = ambox | talk = tmbox | user = ombox | project = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | book = ombox | extension = ombox | other | #default = ombox
}} | type = notice | image = Error creating thumbnail: Unable to save thumbnail to destination | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Column-width (see that page for the {{#if:
|{{{text1}}}
|{{#ifeq:Template | User
|template template
|{{#if:Template
|template
|article}}
}}
}} itself).
It contains usage information, categories, interlanguage links and other content that is not part of the original {{#if:
|{{{text2}}}
|{{#if:
|{{{text1}}}
|{{#ifeq:Template | User
|template template page
|{{#if:Template
|template page
|article}}
}}
}}
}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}
}}{{
#if:
|
| {{#ifeq:Template|Template|}}
}}
| }} }} {{
{{#switch:
{{#if:
|
| {{#if:
|
{{#ifeq:|
| talk
|
}}
|
{{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main | = ambox | talk = tmbox | user = ombox | project = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | book = ombox | extension = ombox | other | #default = ombox
}} | type = notice | image = | imageright = | class = | style = | textstyle = | text = Columns are currently supported only by newer versions of Gecko-based browsers (such as Mozilla Firefox) and WebKit-based browsers (such as Google Chrome and Safari). All versions of Internet Explorer through to version 9 and Opera through to version 11.0 do not support columns. See here for more information. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}
This template is a shortcut for producing columns using CSS. It generates the CSS for various browsers. Supported browsers are the current versions of Firefox, Safari and Chrome.
Usage
Insert this template within a style tag of any block-style element:
{{column-width | [column width]}}
The default column width is 30em.
Example
<div style="{{column-width|25em}}">Lorem ipsum...</div>will produce:
See also
- {{column-count{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}
- {{column-rule{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}
- {{column-gap{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}