n/a – Template
Jump to navigation
Jump to search
(category) |
Lou Montana (talk | contribs) (Add some examples) |
||
Line 1: | Line 1: | ||
{| class="wikitable" | <includeonly>style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!-- | ||
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small></includeonly><noinclude> | |||
Fills ''a table '''cell''''' in grey, with N/A text by default. | |||
{{Important | This template has to be ''inside'' a table cell, e.g: | |||
{{{!}} | |||
{{!}} | |||
<code><nowiki>{| class="wikitable" | |||
! First Name !! Last Name | |||
|- | |- | ||
| {{n/a}} || Miller | |||
|}</nowiki></code> | |||
{{!}} style{{=}}"text-align: center; width: 5em" {{!}} → | |||
{{!}} | |||
{{{!}} class{{=}}"wikitable" | |||
! First Name !! Last Name | |||
{{!}}- | |||
{{!}} {{n/a}} {{!}}{{!}} Miller | |||
{{!}}} | |||
{{!}}} | |||
If put in a text paragraph, it results in <tt style{{=}}"font-size: 0.75em">{{n/a}}</tt>.}} | |||
== Usage == | |||
<code>{{<nowiki/>n/a|'''''text'''''|'''''align'''''|'''''style'''''}}</code> | |||
* text: (Optional, default "N/A") | |||
* align: (Optional, default "center". Named parameter only) text alignment. can be left, center or right | |||
* style: (Optional, default "". Named parameter only) additional CSS (e.g <tt>font-weight: bold</tt>) | |||
{|class="wikitable" | |||
|+ Examples | |||
! Code | |||
! style="width: 10em" | Result | |||
|- | |||
| <nowiki>{{n/a}}</nowiki> | |||
| {{n/a}} | |||
|- | |||
| <nowiki>{{n/a|abc}}</nowiki> | |||
| {{n/a|abc}} | |||
|- | |||
| <nowiki>{{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}}</nowiki> | |||
| {{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}} | |||
|} | |} | ||
[[Category:Templates|{{PAGENAME}}]] | |||
== Source == | |||
<syntaxhighlight lang="html"> | |||
style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!-- | |||
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small> | |||
</syntaxhighlight> | |||
[[Category:Templates|{{uc:{{PAGENAME}}}}]] | |||
</noinclude> |
Revision as of 21:07, 26 October 2019
Fills a table cell in grey, with N/A text by default.
Usage
{{n/a|text|align|style}}
- text: (Optional, default "N/A")
- align: (Optional, default "center". Named parameter only) text alignment. can be left, center or right
- style: (Optional, default "". Named parameter only) additional CSS (e.g font-weight: bold)
Code | Result |
---|---|
{{n/a}} | N/A |
{{n/a|abc}} | abc |
{{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}} | wabbit |
Source
style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!--
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small>