https://translations.ted.com/index.php?title=Template:Multicol/doc&feed=atom&action=historyTemplate:Multicol/doc - Revision history2024-03-28T21:56:48ZRevision history for this page on the wikiMediaWiki 1.30.0https://translations.ted.com/index.php?title=Template:Multicol/doc&diff=1337&oldid=prevElsDK: 1 revision2011-08-16T20:31:34Z<p>1 revision</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="en">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Revision as of 20:31, 16 August 2011</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>ElsDKhttps://translations.ted.com/index.php?title=Template:Multicol/doc&diff=1336&oldid=prevForce92i at 20:39, 29 January 20112011-01-29T20:39:49Z<p></p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!--<br />
PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE<br />
YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT<br />
--><br />
== Usage ==<br />
{{tl|Multicol}} is used to start a multi-column section of a page. Between each block of column text insert <tt>{{tl|Multicol-break}}</tt> and close the last column with <tt>{{tl|Multicol-end}}</tt>. For example:<br />
<br />
<pre><br />
{{Multicol}}<br />
This text appears in the first column.<br />
{{Multicol-break}}<br />
This text appears in the second column.<br />
{{Multicol-break}}<br />
This text appears in the third column.<br />
{{Multicol-end}}<br />
</pre><br />
<br />
Provides this format:<br />
{{Multicol}}<br />
This text appears in the first column.<br />
{{Multicol-break}}<br />
This text appears in the second column.<br />
{{Multicol-break}}<br />
This text appears in the third column.<br />
{{Multicol-end}}<br />
<br />
You can have any number of columns. Each column will be the same width, equally dividing the available horizontal space. Each column has a small right margin (20 pixels), creating a "gutter" that prevents text in one column from touching text in the column to its right. See [[User:Franl|franl]]'s user page for examples of how this template can be used.<br />
<br />
== Parameters ==<br />
This template has two optional parameters: the overall width of the set of columns and the width of the gutter. The overall width of the set of columns can be an absolute value (e.g., <tt>40em</tt>) or a percentage of the available page width (e.g., <tt>50%</tt>). This parameter defaults to <tt>100%</tt>. For example, to create a multi-column section that is only 50% the width of the page:<br />
<br />
<pre><br />
{{Multicol|50%}}<br />
This text appears in the first column.<br />
{{Multicol-break}}<br />
This text appears in the second column.<br />
{{Multicol-break}}<br />
This text appears in the third column.<br />
{{Multicol-end}}<br />
</pre><br />
<br />
Provides this format:<br />
{{Multicol|50%}}<br />
This text appears in the first column.<br />
{{Multicol-break}}<br />
This text appears in the second column.<br />
{{Multicol-break}}<br />
This text appears in the third column.<br />
{{Multicol-end}}<br />
<br />
The multi-column region is always positioned on the left side of the containing block. To change this, place the above Wikitext in a <tt>[[DIV (HTML tag)|DIV]]</tt> block that has the [[Cascading Style Sheet|CSS]] attribute <tt>text-align</tt> set to either <tt>center</tt> or <tt>right</tt>, like this:<br />
<br />
<pre><br />
<div style="text-align:center;">{{center|<br />
{{Multicol|50%}}<br />
...<br />
{{Multicol-end}}<br />
}}</div><br />
</pre><br />
<br />
== Related templates ==<br />
The templates {{tl|Col-begin}} and friends do something similar to this template and its friends, but this template may be easier to use. Each of the following examples produce the same result (a 3-column table in which all columns have equal width):<br />
<br />
<center><br />
{{Multicol|50%}}<br />
<pre><br />
{{Multicol}}<br />
Column 1<br />
{{Multicol-break}}<br />
Column 2<br />
{{Multicol-break}}<br />
Column 3<br />
{{Multicol-end}}<br />
</pre><br />
{{Multicol-break}}<br />
<pre><br />
{{Col-begin}}<br />
{{Col-3}}<br />
Column 1<br />
{{Col-3}}<br />
Column 2<br />
{{Col-3}}<br />
Column 3<br />
{{Col-end}}<br />
</pre><br />
{{Multicol-end}}<br />
</center><br />
<br />
It's simpler to add more columns to the {{tl|Multicol}} example than to the {{tl|Col-begin}} example, because in the latter case, all occurrences of {{tl|Col-3}} would need to be changed to {{tl|Col-4}}.<br />
<br />
<includeonly><br />
<br />
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. --><br />
[[Category:Table and column templates]]<br />
<br />
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. --><br />
[[ca:Plantilla:Columnes]]<br />
[[cy:Nodyn:Multicol]]<br />
[[eo:Ŝablono:Multkolumna]]<br />
[[es:Plantilla:Columnas]]<br />
[[fa:الگو:چندستون]]<br />
[[fr:Modèle:Colonnes2]]<br />
[[hsb:Předłoha:Multicol]]<br />
[[id:Templat:Multicol]]<br />
[[it:Template:MultiCol]]<br />
[[ja:Template:Multicol]]<br />
[[pt:Predefinição:Multicol]]<br />
[[ru:Шаблон:Multicol]]<br />
[[zh:template:multicol]]<br />
[[uk:Шаблон:Multicol]]<br />
</includeonly></div>Force92i