"आकृति:Multicol" के अवतरणसभमे अन्तर

updated wikilinks
imported>Down10
(moved Template:MultiCol to Template:Multicol: conforms to WP:MOSCL)
imported>Down10
(updated wikilinks)
<includeonly><div><!-- Do not remove this DIV: it prevents the Wiki code from inserting an extra linebreak above this table. -->
{| width="{{{1|100%}}}" border="0" cellspacing="0" cellpadding="0" style="background-color: transparent; table-layout: fixed;"
|- valign="top"
|<div style="margin-right: 20px;"></includeonly><noinclude>
== Usage ==
Use this template to start a multi-column section of a page. For example:
{{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:
 
<pre>
{{MultiColMulticol}}
This text appears in the first column.
{{ColBreakMulticol-break}}
This text appears in the second column.
{{ColBreakMulticol-break}}
This text appears in the third column.
{{EndMultiColMulticol-end}}
</pre>
 
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 pixelpixels), rightcreating margin,a which"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.
 
This template has one optional parameter: the overall width of the set of columns. This can be an absolute value (e.g., <tt>12cm</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 of a page that is only 50% the width of the page, do this:
== Parameters ==
This template has one optional parameter: the overall width of the set of columns. This can be an absolute value (e.g., <tt>12cm40em</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 of a page that is only 50% the width of the page, do this:
 
<pre>
{{MultiColMulticol|50%}}
This text appears in the first column.
{{ColBreakMulticol-break}}
This text appears in the second column.
{{ColBreakMulticol-break}}
This text appears in the third column.
{{EndMultiColMulticol-end}}
</pre>
 
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:
 
<pre>
<div style="text-align: center;">{{center|
{{MultiColMulticol|50%}}
...
{{EndMultiColMulticol-end}}
}}</div>
</pre>
 
== Related Templatestemplates ==
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):
 
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):
 
<center>
{{MultiColMulticol|50%}}
<pre>
{{MultiColMulticol}}
Column 1
{{ColBreakMulticol-break}}
Column 2
{{ColBreakMulticol-break}}
Column 3
{{EndMultiColMulticol-end}}
</pre>
{{ColBreakMulticol-break}}
<pre>
{{Col-begin}}
{{Col-end}}
</pre>
{{EndMultiColMulticol-end}}
</center>
 
It's simpler to add more columns to the {{tl|MultiColMulticol}} example than to the {{tl|Col-begin}} example, because in the latter case, all occurrences of {{tl|Col-3}} would haveneed to be changed to {{tl|Col-4}}.
 
{{Template:Col-begin/doc}}
बेनामी उपयोगकर्ता