http://ml.sayahna.org/index.php?title=Template:Column_templates&feed=atom&action=historyTemplate:Column templates - Revision history2024-03-28T19:00:15ZRevision history for this page on the wikiMediaWiki 1.31.5http://ml.sayahna.org/index.php?title=Template:Column_templates&diff=12259&oldid=prevCvr: 1 revision2014-08-22T07:25:20Z<p>1 revision</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 07:25, 22 August 2014</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Cvrhttp://ml.sayahna.org/index.php?title=Template:Column_templates&diff=12258&oldid=prevFunandtrvl: rmv whitespace2014-08-15T18:38:19Z<p>rmv whitespace</p>
<p><b>New page</b></p><div>{{#switch:{{lc:{{PAGENAME}}}}<br />
| col-2 = The [[Template:Col-2]] sets column width for each of two columns, with align=left, valign=top. The width, align or valign can be changed: <nowiki>{{col-2 |width=40%|align=right|valign=center}}</nowiki>.<br/><br/><br />
| col-3 = The [[Template:Col-3]] sets column width for each of three columns, with align=left, valign=top. The width, align or valign can be changed: <nowiki>{{col-3 |width=25%|align=right|valign=center}}</nowiki>.<br/><br/><br />
| col-4 = The [[Template:Col-4]] sets column width for each of four columns.<br/><br/><br />
| col-5 = The [[Template:Col-5]] sets column width for each of five columns.<br/><br/><br />
| col-6 = The [[Template:Col-6]] sets column width for each of six columns, with align=left, valign=top. The width, align or valign can be changed: <nowiki>{{col-6 |width=20%|align=right|valign=center}}</nowiki>.<br/><br/><br />
| col-start=The [[Template:Col-start]] begins a wikitable (same as <nowiki>{{col-begin}}</nowiki>).<br/><br/><br />
}}<br />
The {{tl|col-begin}}, {{tl|col-break}} and {{tl|col-end}} templates control columns of text on a page:<br />
:*<nowiki>{{col-begin}}</nowiki>: starts a table (followed by <nowiki>{{col-break}}</nowiki> for 1st column)<br />
:*<nowiki>{{col-break}}</nowiki>: triggers the start of each column<br />
:*<nowiki>{{col-end}}</nowiki>: ends the multi-column table.<br />
The widths of columns can be specified by using various additional codes. See below for examples.<br />
<br />
== Usage ==<br />
:: <nowiki>{{col-begin|width=70%}}</nowiki>: start table with width.<br />
:: <nowiki>{{col-break|width=66%}}</nowiki>: start column-1 as 66% wide.<br />
:: This is text in col-1.<br />
:: <nowiki>{{col-break|width=33%}}</nowiki>: start column-2 as 33% wide.<br />
:: Text column-2.<br />
:: <nowiki>{{col-end}}</nowiki><br />
The table will have two columns, with column 1 twice (2×) the width of column 2.<br />
<br />
A border of 2px (1px width on each side) corresponds to a 5%. Therefore, with a 2px border—for example, as in [[Wikipedia:Tutorial/Wrap-up and more info]]—the width needs to be 95% for the table to fit within the screen. Since it's possible that some tables might not have a border, correction on the individual page could be made after substitution. Another way to create a two column table is like this:<br />
<br />
{|<br />
|<br />
<pre><br />
{{col-begin|width=95%}}<br />
|-<br />
| <br />
Left column<br />
|<br />
Right column<br />
|}<br />
</pre><br />
|}<br />
<br />
{{col-begin|width=95%}}<br />
{{col-1-of-4}}<br />
{{tl|Col-begin}}<br />
{{tl|Col-2}}<br />
Column 1 here<br />
{{tl|Col-2}}<br />
Column 2 here<br />
{{tl|Col-end}}<br />
{{col-2-of-4}}<br />
{{tl|Col-begin}}<br />
{{tl|Col-3}}<br />
Column 1 here<br />
{{tl|Col-3}}<br />
Column 2 here<br />
{{tl|Col-3}}<br />
Column 3 here<br />
{{tl|Col-end}}<br />
{{col-3-of-4}}<br />
{{tl|Col-begin}}<br />
{{tl|Col-4}}<br />
Column 1 here<br />
{{tl|Col-4}}<br />
Column 2 here<br />
{{tl|Col-4}}<br />
Column 3 here<br />
{{tl|Col-4}}<br />
Column 4 here<br />
{{tl|Col-end}}<br />
{{col-4-of-4}}<br />
and so on, up to {{tl|Col-7}}<br />
{{col-end}}<br />
<br />
{{col-begin|width=95%}}<br />
{{col-1-of-2}}<br />
&#123;{[[Template:Col-begin|Col-begin]]|class=references-small}}<br />
{{tl|Col-break}}<br />
Column 1 here<br />
{{tl|Col-break}}<br />
Column 2 here<br />
{{tl|Col-break}}<br />
Column 3 here<br />
{{tl|Col-break}}<br />
Column 4 here<br />
{{tl|Col-break}}<br />
Column 5 here<br />
{{tl|Col-break}}<br />
Column 6 here<br />
{{tl|Col-end}}<br />
{{col-2-of-2}}<br />
&#123;{[[Template:Columns-start|Columns-start]]|num=3}}<br />
Column 1 here<br />
{{tl|Column}}<br />
Column 2 here<br />
{{tl|Column}}<br />
Column 3 here<br />
{{tl|Columns-end}}<br />
{{col-end}}<br />
<br />
{{col-begin|width=95%}}<br />
{{col-1-of-2}}<br />
{{tl|Multicol}}<br />
Column 1 here<br />
{{tl|Multicol-break}}<br />
Column 2 here<br />
{{tl|Multicol-break}}<br />
Column 3 here<br />
{{tl|Multicol-break}}<br />
Column 4 here<br />
{{tl|Multicol-end}}<br />
{{col-2-of-2}}<br />
{{tl|Top}}<br />
Column 1 here<br />
{{tl|Mid}}<br />
Column 2 here<br />
{{tl|Bottom}}<br />
{{col-end}}<br />
<br />
===Examples===<br />
* See: [[Template:Col-break/examples]]<br />
<br />
== See also ==<br />
{{column templates/others}}<br />
<br />
== External links ==<br />
* [http://www.htmlcodetutorial.com/_MULTICOL.html HTML MULTICOL Code Tutorial]<br />
* [http://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_multi-column_layouts Using CSS multi-column layouts]<br />
<br />
{{Selfref|This [[Wikipedia:Template|template]] is a [[Wikipedia:Avoid self-references|self-reference]] and so is part of the Wikipedia project rather than the encyclopedic content.}}<noinclude><br />
[[Category:Table and column templates| ]]<br />
[[Category:Template documentation]]<br />
</noinclude></div>Funandtrvl