Template:cell bg

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is a convenience template to produce colored cells in tables. The default color is a dark gray (#eaecf0).

Usage

[edit]

Within a table, place the {{cell bg}} template before the cell content, like this:

{| class="wikitable"
| Normal cell
| {{cell bg}} | Colored cell
|}

which results in the following:

Normal cell Colored cell

Pass the first unnamed parameter to use a custom color:

{| class="wikitable"
| Normal cell
| {{cell bg|pink}} | Colored cell
|}

resulting in:

Normal cell Colored cell