Template:Decimal cell
This template simulates decimal-alignment for a table cell by splitting a decimal number to place integer and fractional portions into two separate cells and minimizing the space between those cells. See Help:Table#Decimal point alignment for more information.
Usage
This template requires a single un-named parameter: the value to format.
An optional named |style=CSS string
parameter can be used to pass a CSS style string to apply to the cell or the text in it. The semicolon at the end of this string is optional. NB: do not quote this string (FIXME!). You can use wiki-markup or HTML tags to format the text, but you must separately format the integer and decimal parts independently and there is no way to format the decimal-point itself using these methods.
Examples
Wiki source | Rendered result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
</syntaxhighlight> |
|
Other examples:
See also
- Template:Decimal-align, similar template that uses <span> elements instead of separate cells, and can wrap wikitext (including multiple table cells).