Sablon:Rendezett táblázat

A Wikipédiából, a szabad enciklopédiából
Használati útmutató

Ez a sablon egyszerűsíti táblázatok beágyazását, vagy behelyezését olyan más sablonokba, amelyek közvetlenül nem támogatják a jelölőnyelv belső használatát, vagy nehézzé teszik annak szokásos használatát a beágyazás során.

Kötelező értékek[szerkesztés]

* cols = az oszlopok száma
* pár érték, hogy látszódjon is valami
  (lásd lejjebb az egyszerű példáknál)

Választható értékek[szerkesztés]

Az összes többi.

Értékek táblázata és magyarázat[szerkesztés]

Érték Leírás Példa Alapérték
cols Number of columns in the table. |cols=4 2
fullwidth If set (to anything, "on", "true", "yes", etc.), ensures table spans entire width available. (Effect is to remove border-spacing and add width:100% to the table's styling.) |fullwidth=on Not set
class CSS/HTML osztályok (en) applied to the table. |class=wikitable   |class=infobox
|class=sortable nowrap   |class=sidebar
Not set
style CSS beállítások applied to the table. |style=width:80%;background:transparent; Not set
colwidth Width of each column (or include "width:...;" in colstyle). |colwidth=6.0em   |colwidth=25% Not set
colstyle CSS styling prepended to the cell style for each column. |colstyle=background:transparent; Not set
rowstyle CSS styling applied to each row. |rowstyle=text-align:center; vertical-align:top;
leftright If set (to anything, "on", "true", "yes", etc.) is equivalent to |col1align=left and |col2align=right |leftright=on Not set
rightleft If set (to anything, "on", "true", "yes", etc.) is equivalent to |col1align=right and |col2align=left |rightleft=on Not set
colnCwidth CSS width property of cell in column nC (or include "width:...;" in colnCstyle). |col2width=9.0em   |col3width=35% Not set
colnCclass Classes added to cell in column nC. |col1class=navbox-group Not set
colnCalign CSS text-align property (left-right-center) of cell in column nC's cell contents (or include "text-align:...;" in colnCstyle). |col4align=right Not set
colnCnowrap If set (to anything, "on", "true", "yes", etc.) adds "white-space:nowrap;" to the CSS style of cell in column nC (i.e., to prevent lines within its cells from wrapping; or include "nowrap" in colnCclass or "white-space:nowrap;" in colnCstyle). |col5nowrap=on
colnCstyle CSS style appended to cell in column nC. |col4style=font-style:italic; Not set
colnCheader If set (to any value), changes cells in column nC to table headers (headings). |col1header=on Not set
rownRclass Classes applied to row nR. |row10class=navbox-abovebelow Not set
rownRstyle CSS styling applied to row nR. |row2style=font-weight:bold;
rownRheader If set (to any value), changes cells in row nR to table headers (headings). |row1header=on Not set
classnR.nC Classes applied to cell in row nR, column nC. Overrides any other class attributions (rownRclass, colnCclass). |class1.2=adr Not set
stylenR.nC CSS styling applied to cell in row nR, column nC. Overrides any more general styling (leftright, colnCalign, rownRstyle, etc). |style5.3=text-align:right; Not set
Unnamed parameters Each unnamed parameter is taken to be the next cell in the table, starting at the table's top left corner and working left to right from top to bottom. | Azerbaijan | Malta | Zaire Not set

Használata[szerkesztés]

{{Rendezett táblázat
| cols =
| fullwidth =
| class =
| style =
| colwidth =
| leftright =
| rightleft =
| colstyle =
| rowstyle =

| col1width =
| col1class =
| col1align =
| col1style =
| col1nowrap =

| col2width =
| col2class =
| col2align =
| col2style =
| col2nowrap =

<!-- etc, to: -->

<!--az n-dik oszlop=nC-->
| colnCwidth =
| colnCclass =
| colnCalign =
| colnCstyle =
| colnCnowrap =

| row1class =
| row1style =
| row1header =

| row2class =
| row2style =
| row2header =

<!-- etc, to: -->

<!--az n-dik sor=nR-->
| rownRclass =
| rownRstyle =
| rownRheader =

<!--az X-Y cella sora-oszlopa= R,C:-->
| classR.C =
| styleR.C =

| (cell 1,1) | (cell 1,2) | ... | ...
| (cell 2,1) | (cell 2,2) | ... | ...
}}


Egyszerű minták, példák[szerkesztés]

{{Rendezett táblázat
|cols=3 |class=wikitable
| A | 1 | a
| B | 2 | b
}}
A 1 a
B 2 b


{{Rendezett táblázat
|cols=4 |class=wikitable
|col1align=center |col2align=center
|col3align=right  |col4align=right
| AAA | aa    | 123  | 12345
| B   | bbbbb | 1234 | 2
}}
AAA aa 123 12345
B bbbbb 1234 2


{{Rendezett táblázat
|class=wikitable |style=width:20em;
|col1align=center |col2align=right
| AAA | 123
| B   | 2
}}
AAA 123
B 2


{{Rendezett táblázat
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
}}
U # l
A 1 a
B 2 b


{{Rendezett táblázat
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
|   |   |  
| C | 3 | c
}}
U # l
A 1 a
B 2 b
C 3 c


Kapcsolódó sablonok[szerkesztés]

Lásd még[szerkesztés]