Jump to content
Wikipedia The Free Encyclopedia

Template:Alternating rows table

From Wikipedia, the free encyclopedia
Template documentation[view] [edit] [history] [purge]

This template may be used to generate a table with alternating row shading.

Usage

{{alternating rows table|class=wikitable}}
! Number !! Cell name
|-
| 1 || Cell 1
|-
| 2 || Cell 2
|-
| 3 || Cell 3
|-
| 4 || Cell 4
|-
{{end}}
Number Cell name
1 Cell 1
2 Cell 2
3 Cell 3
4 Cell 4

Parameters

The default class is |class=wikitable, for a sortable table, use |class=wikitable sortable.

Known issues

Background color on rows will look off if one of the cells spans multiple rows (ex. rowspan="2"). If the table is sortable, then this gets fixed once sorted since sortable collapses row spans.

See also

The above documentation is transcluded from Template:Alternating rows table/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /