Mall:Col-begin/dok
Användning
{{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-begin|col-begin}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-break|col-break}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-end|col-end}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-2|col-2}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-3|col-3}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-4|col-4}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-5|col-5}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-6|col-6}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-7|col-7}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}, {{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|col-8|col-8}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}} är mallar för att dela upp en sida i kolumner, genom att skapa en tabell.
- {{col-begin}} – börjar tabellen.
- {{col-break}} – börjar ny kolumn (krävs även före första kolumnen).
- {{col-end}} – avslutar tabellen.
- {{col-2}}, {{col-3}}, {{col-4}}, {{col-5}}, {{col-6}}, {{col-7}}, {{col-8}} – kan användas istället för {{col-break}} om man önskar 2, 3, 4, 5, 6, 7 eller 8 lika breda kolumner.
Fullständig användning
- {{col-begin | width= BREDD | bgColor=BAKGRUNDFÄRG | class=KLASSNAMN}}
- BREDD = Tabellens bredd i förhållande till hela sidan, 100% om inget annat anges. Anges med procentsats (till exempel 50%).
- BAKGRUNDFÄRG = Tabellens bakgrundsfärg, transparent bakgrund om inget annat anges. Anges med engelskt ord (till exempel red,black,blue,yellow) eller som RGB-värde (till exempel #FF0000), se Wikipedia:Färger för färgkoder.
- KLASSNAMN = Klassnamn för avancerad användning, anges oftast inte.
- {{col-break | width=BREDD | gap=MELLANRUM}}
- BREDD = Kolumnens bredd i % av hela tabellen (bredden anpassas automatiskt till innehållet om inget annat anges)
- MELLANRUM = Extra mellanrum mellan denna och förgående kolumn (ex. 5px för 5 bildpunkters mellanrum)
- {{col-end}}
- {{col-2}} Kortform för {{col-break|width=50%}}, används om man vill ha två lika breda kolumner.
- {{col-3}} Kortform för {{col-break|width=33.3%}}, används om man vill ha tre lika breda kolumner.
- {{col-4}} Kortform för {{col-break|width=25%}}, används om man vill ha fyra lika breda kolumner.
- {{col-5}} Kortform för {{col-break|width=20%}}, används om man vill ha fem lika breda kolumner.
Exempel
Enkel användning med col-break
{{col-begin}}
{{col-break}}
*Volvo
*ABB
*Electrolux
{{col-break}}
*Ikea
*H&M
{{col-end}}
width="{{{width}}}"}} align="left" valign="top" {{#if: | style="padding-left:{{{gap}}};" }}|
|
width="{{{width}}}"}} align="left" valign="top" {{#if: | style="padding-left:{{{gap}}};" }}|
|
Kolumner med angivna bredder
{{col-begin|width=40%}}
{{col-break|width=70%}}
*Volvo
*ABB
*Electrolux
{{col-break|width=30%}}
*Ikea
*H&M
{{col-end}}
width="70%"}} align="left" valign="top" {{#if: | style="padding-left:{{{gap}}};" }}|
|
width="30%"}} align="left" valign="top" {{#if: | style="padding-left:{{{gap}}};" }}|
|
Tre kolumner med lika bredd
{{col-begin|width=100%}}
{{col-3}}
*Adam
*Bertil
{{col-3}}
*Cesar
*David
{{col-3}}
*Erik
*Filip
{{col-end}}
|
|
|
Se även
{{{{#ifeq:{{{subst}}}|ja|subst:}}{{#ifeq:{{{länk}}}|nej|Kolumner|Kolumner}}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#ifeq:x|| |{{{10}}} }}{{#ifeq:x|| |{{{11}}} }}{{#ifeq:x|| |{{{12}}} }}{{#ifeq:x|| |{{{13}}} }}{{#ifeq:x|| |{{{14}}} }}{{#ifeq:x|| |{{{15}}} }}}}
{{
#ifeq: dok | dok |
{{
#ifeq: visa | visa
| <templatestyles src="Ambox/styles.css"/>
{{#if:|}}}}
| }}