টেমপ্লেট:Aligned table/নথি

উইকিপিডিয়া, মুক্ত বিশ্বকোষ থেকে

ব্যবহার[সম্পাদনা]

{{Aligned table
| fullwidth = 
| class =      <!--class for table-->
| style =      <!--CSS styling for table-->
| cols =       <!--number of columns in table (defaults to 2)-->

| colNclass =  <!--class for Nth column-->
| colNalign =  <!--alignment (left/right/center) for Nth column's contents-->
| colNstyle =  <!--CSS styling for Nth column-->

| rowNclass =  <!--class for Nth row-->
| rowNstyle =  <!--CSS styling for Nth row-->

| (table cell 1,1) | (table cell 1,2) | ... | ...
}}
Parameter Description Example(s) Default
fullwidth
Set to anything ("on", "yes", "true", ...) 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 Class for the table |class=wikitable  |class=infobox  |class=sidebar  etc. none
style Styling for the table |style=background:transparent;
|style=width:100%;background:transparent;
etc.
none
cols Number of columns in the table |cols=4 2
col[C]class Class for the cells in column number [C] |col1class=navbox-group none
col[C]align Alignment (left, right, center) for column [C]'s cell contents. |col4align=right none
 leftright Set to anything ("on", "yes", "true", ...) to set |col1align=left and |col2align=right. |leftright=on not set
col[C]style Styling for column [C]'s cells |col3style=background:lavender; none
 col[C]nowrap
Set to anything ("on", "yes", "true", ...) to add white-space:nowrap to column [C]'s cell styling
(i.e. prevent lines within its cells from wrapping).
|col1nowrap=on not set
row[R]class Class for the cells in row [R] |row10class=navbox-abovebelow none
row[R]style Styling for cells in row [R] |row1style=font-weight:bold; none
class[R].[C] Class for the cell in row [R], column [C]. Overrides any other class attribution (col[C]class, row[R]class). none
style[R].[C] Styling for the cell in row [R], column [C]. Overrides any more generalized styling (col[C]align, leftright, col[C]style, col[C]nowrap, row[R]style). none
Unnamed parameters Each unnamed parameter is taken to be the next cell in the table, working top-to-bottom, left-to-right and starting from the table's top left corner.

উদাহরণ[সম্পাদনা]

{{Aligned table
|class=wikitable
|cols=3
| A | 1 | a
| B | 2 | b
}}
A 1 a
B 2 b
{{Aligned table
|class=wikitable
|cols=4
|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
|cols=2
|col1align=center
|col2align=right
| AAA | 123
| B | 2
}}
AAA 123
B 2

আরও দেখুন[সম্পাদনা]