Template:Div col: Difference between revisions
Template page
More actions
No edit summary |
mNo edit summary |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<templatestyles src="Div col/styles.css"/><div class="div-col {{#ifeq: {{{small|}}} | yes | |||
| div-col-small | |||
-->{{#if:{{{cols|{{{1|}}}}}}{{{ | }} {{#ifeq: {{{rules|}}} | yes | ||
-- | |div-col-rules | ||
}} {{{class|}}}" <!-- | |||
-->{{# | -->{{#if: {{{cols|}}}{{{1|}}}{{{colwidth|}}}{{{2|}}}{{{gap|}}}{{{style|}}} | ||
-->{{# | | style="{{#if: {{{cols|}}}{{{1|}}} | ||
{{Documentation}} | | -moz-column-count:{{#if: {{{cols|}}} | ||
</noinclude> | | {{{cols|}}} | ||
| {{{1|}}} | |||
}};-webkit-column-count:{{#if: {{{cols|}}} | |||
| {{{cols|}}} | |||
| {{{1|}}} | |||
}};column-count:{{#if: {{{cols|}}} | |||
| {{{cols|}}} | |||
| {{{1|}}} | |||
}}; | |||
}}{{#if: {{{colwidth|}}}{{{2|}}} | |||
| -moz-column-width:{{#if: {{{colwidth|}}} | |||
| {{{colwidth|}}} | |||
| {{{2|}}} | |||
}};-webkit-column-width:{{#if: {{{colwidth|}}} | |||
| {{{colwidth|}}} | |||
| {{{2|}}} | |||
}};column-width:{{#if: {{{colwidth|}}} | |||
| {{{colwidth|}}} | |||
| {{{2|}}} | |||
}}; | |||
}}{{#if: {{{gap|}}} | |||
| -moz-column-gap:{{{gap|}}};-webkit-column-gap:{{{gap|}}};column-gap:{{{gap|}}}; | |||
}}{{#switch: {{{rules|}}} | |||
||yes= | |||
|#default=-moz=column-rule:{{{rules|}}};-webkit-column-rule:{{{rules|}}};column-rule:{{{rules|}}}; | |||
}}{{{style|}}}" | |||
}}><!-- Inventory how many pages use small=yes | |||
-->{{#ifeq: {{{small|}}} | yes | |||
| [[Category:Pages using div col with small parameter]] | |||
}}<!-- Inventory how many pages use content=* | |||
-->{{#if: {{{content|}}} | |||
| {{{content|}}}</div>[[Category:Pages using div col with content parameter]] | |||
}}<!-- | |||
--><noinclude>{{Div col end}}{{Documentation}}</noinclude> | |||
Latest revision as of 09:22, 21 June 2023
This documentation is transcluded from Template:Div col/doc.
This template creates a multi-column list layout using CSS columns. It is paired with {{Div col end}}.
Usage
{{Div col | cols = 3 }}
* Item 1
* Item 2
{{Div col end}}
Parameters
1/cols- number of columns
colwidth- minimum column width (overrides column count)
gap- gap between columns
style- additional CSS style
smallyesfor smaller fontcontent- inline content between the tags
class- additional CSS classes