Andoza:Aligned table

Vikipediya, ochiq ensiklopediya
Jump to navigation Jump to search
Documentation icon Andoza hujjati[koʻrib chiqish] [tahrirlash] [tarix] [yangilash]

The purpose is of this template is for generating simple tables in locations where standard table markup is either not possible, without significant use of the Andoza:Tld magic word (e.g., with a {{sidebar}} template), or cumbersome (due to the repetitive use of specification of the same style statement in each row). This template should not be used to replace standard table markup in articles. This template is meant to be complimentary to {{infobox}} or {{sidebar}}, and not a replacement for {{infobox}} or {{sidebar}}.

A simpler method to include a table in a template that does not directly support table markup is to create the table in a sub-template using standard markup and transclude it.

Full syntax[tahrir]

For parameter explanations, see table below.

{{Aligned table
| cols =
| fullwidth =
| class =
| style =
| colwidth =
| leftright =
| colstyle =
| rowstyle =

<!--for Cth column:-->
| colCwidth =
| colCclass =
| colCalign =
| colCstyle =
| colCnowrap =

<!--for Rth row:-->
| rowRclass =
| rowRstyle =
| rowRheader =

<!--for cell R,C:-->
| classR.C =
| styleR.C =

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

Parameters[tahrir]

Parameter Description Examples Default
cols Number of columns in the table. |cols=4 2
fullwidth Set to anything ("on", "true", "yes", etc) to ensure 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 class/es applied to the table. |class=wikitable   |class=infobox
|class=sortable nowrap   |class=sidebar
none
style CSS styling applied to the table. |style=width:80%;background:transparent; none
colwidth Width of each column (or include "width:...;" in colstyle). |colwidth=6.0em   |colwidth=25% not set
colstyle CSS styling applied to each column. |colstyle=background:transparent; "
rowstyle CSS styling applied to each row. |rowstyle=text-align:center; "
leftright Set to anything ("on", "true", "yes", etc) in place of |col1align=left and |col2align=right |leftright=on not set
colAndoza:Varwidth Width of column number Andoza:Var (or include "width:...;" in colAndoza:Varstyle). |col2width=9.0em   |col3width=35% none set
colAndoza:Varclass Class/es applied to column number Andoza:Var. |col1class=navbox-group "
colAndoza:Varalign Alignment (left / right / center) for column Andoza:Var's cell contents (or include "text-align:...;" in colAndoza:Varstyle). |col4align=right none set
colAndoza:Varnowrap Set to anything ("on", "true", "yes", etc) to add "white-space:nowrap;" to column Andoza:Var's cell styling (i.e. to prevent lines within its cells from wrapping; or include "nowrap" in colAndoza:Varclass or "white-space:nowrap;" in colAndoza:Varstyle). |col5nowrap=on "
colAndoza:Varstyle CSS styling applied to column number Andoza:Var. |col4style=font-style:italic; "


colAndoza:Varheader Set to any value (e.g. Y) to change col's cells from data cells to table headers (headings). |col1header=on not set
rowAndoza:Varclass Class/es applied to row number Andoza:Var. |row10class=navbox-abovebelow none set
rowAndoza:Varstyle CSS styling applied to row number Andoza:Var. |row2style=font-weight:bold; "
rowAndoza:Varheader Set to any value (e.g. Y) to change row's cells from data cells to table headers (headings). |row1header=on not set
classAndoza:Var.Andoza:Var Class/es applied to cell in row Andoza:Var, column Andoza:Var. Overrides any other class attributions (rowAndoza:Varclass, colAndoza:Varclass). |class1.2=adr none set
styleAndoza:Var.Andoza:Var CSS styling applied to cell in row Andoza:Var, column Andoza:Var. Overrides any more general styling (leftright, colAndoza:Varalign, rowAndoza:Varstyle, etc). |style5.3=text-align:right; "
Andoza:Sans-serif 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 empty

Examples[tahrir]

{{Aligned table
|cols=3 |class=wikitable
| A | 1 | a
| B | 2 | b
}}
A 1 a
B 2 b
{{Aligned table
|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
{{Aligned table
|class=wikitable |style=width:20em;
|col1align=center |col2align=right
| AAA | 123
| B   | 2
}}
AAA 123
B 2
{{Aligned table
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
}}
U # l
A 1 a
B 2 b