Difference between revisions of "Template:Cell/doc"

From blackwiki
Jump to navigation Jump to search
imported>Crissov
imported>Frietjes
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
 
The {{tl|cell}} template can be used to create a table cell with a specified background color.
 
The {{tl|cell}} template can be used to create a table cell with a specified background color.
  
Line 64: Line 64:
 
*{{tl|cell3}} – three consecutive equal {{tl|cell}} calls
 
*{{tl|cell3}} – three consecutive equal {{tl|cell}} calls
 
*{{tl|cells}} – up to twenty consecutive equal {{tl|cell}} calls
 
*{{tl|cells}} – up to twenty consecutive equal {{tl|cell}} calls
*{{tl|colorbox}}
+
*{{tl|color box}}
 
*{{tl|color strip}}
 
*{{tl|color strip}}
 
*{{tl|scarf}}
 
*{{tl|scarf}}
  
 
<includeonly>
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
<!-- CATEGORIES HERE, THANKS -->
 
[[Category:Color templates]]
 
[[Category:Color templates]]
 
</includeonly>
 
</includeonly>

Revision as of 13:46, 20 October 2016

The {{cell}} template can be used to create a table cell with a specified background color.

Usage

{{cell|COLOR}}

The template takes one unnamed parameter as input, which is the background color of the table cell. The default content of each cell is a single non-breaking space with a font-size of 50%. To override the content of each cell, use a second unnamed parameter. To override the default font-size, use the style= parameter.

Complete specification
{{cell|Color|Text|style=Style}}
Default
{{cell|Color|&nbsp;|style=font-size:50%;}}

Examples

Example 1

Code
{| width="50%" cellspacing=0
{{cell|red}}{{cell|blue}}{{cell|green}}
|}
Result
     

Example 2

Code
{| width="50%" cellspacing=0
{{cell|red| }}{{cell|blue| }}{{cell|green| }}
|}
Result

Example 3

Code
{| width="50%" cellspacing=0
{{cell|red|R|style=text-align:center}}{{cell|blue|B|style=text-align:center}}{{cell|green|G|style=text-align:center}}
|}
Result
R B G

Note

The {{cell2}} and {{cell3}} templates can be used to condense a sequence of cells of the same color.

See also