• New article from the Springfield Shopper: Season 36 News: A new episode title, “Homer and Her Sisters”, has been announced!
  • New article from the Springfield Shopper: The Simpsons are trapped on a flight from Hell this December!
  • Wikisimpsons needs more Featured Article, Picture, Quote, Episode and Comprehensive article nominations!
  • Wikisimpsons has a Discord server! Click here for your invite! Join to talk about the wiki, Simpsons and Tapped Out news, or just to talk to other users.
  • Make an account! It's easy, free, and your work on the wiki can be attributed to you.
TwitterFacebookDiscord

Difference between revisions of "Template:Table"

Wikisimpsons - The Simpsons Wiki
 
(57 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{| border="1" cellpadding="6" cellspacing="1" class="wikitable" style="width:{{{width|100%}}};"
+
{| {| {{#Switch:{{{collapsible|no}}} |yes=class="collapsible collapsed"}} align="{{{align|center}}}" text-align="{{{text-align|center}}}" width="{{{width|100%}}}" style="background: {{{background color|#{{DarkColorSwitch}}}}}; -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -khtml-border-top-left-radius: 5px; -icab-border-top-left-radius: 5px; -o-border-top-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -khtml-border-bottom-left-radius: 5px; -icab-border-bottom-left-radius: 5px; -o-border-bottom-left-radius: 5px;; border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -khtml-border-bottom-left-radius: 5px; -icab-border-bottom-left-radius: 5px; -o-border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; -khtml-border-bottom-right-radius: 5px; -icab-border-bottom-right-radius: 5px; -o-border-bottom-right-radius: 5px;; border-radius: {{{Curve|10px}}}; -moz-border-radius: {{{Curve|10px}}}; -webkit-border-radius: {{{Curve|10px}}}; -khtml-border-radius: {{{Curve|10px}}}; -icab-border-radius: {{{Curve|10px}}}; -o-border-radius: {{{Curve|10px}}};; 1em; border: 5px solid #{{LightColorSwitch}};" padding="{{{padding|0px}}}"
 +
|-
 +
| align="center" |
 +
{| {{#Switch:{{{sortable|no}}} |yes = class="sortable"}} {{#switch:{{{plainlinks|no}}}|yes=class="plainlinks"}} border=1 width="100%" align="center" style="background: #{{DarkColorSwitch}}; border:1px solid #{{DarkColorSwitch}}; border-collapse:collapse;"
 +
|- style="background: #{{LightColorSwitch}}"
 
{{{1}}}
 
{{{1}}}
|}<noinclude>[[Category:Templates|{{PAGENAME}]]</noinclude>
+
|}
 +
|}{{#switch:{{{clearall|yes}}}|yes=<br clear=all>|no=}}<noinclude>
 +
 
 +
== Usage ==
 +
{{Main|Help:Table markup}}
 +
Typical table structure should be like this:
 +
<pre>
 +
{{Table|
 +
{{TH|A}}
 +
{{TH|B}}
 +
{{TH|C}}
 +
{{TBT|1}}
 +
{{TB|2}}
 +
{{TB|3}}
 +
{{TBT|4}}
 +
{{TB|5}}
 +
{{TB|6}}
 +
}}</pre>
 +
 
 +
Makes:
 +
{{Table|
 +
{{TH|A}}
 +
{{TH|B}}
 +
{{TH|C}}
 +
{{TBT|1}}
 +
{{TB|2}}
 +
{{TB|3}}
 +
{{TBT|4}}
 +
{{TB|5}}
 +
{{TB|6}}
 +
}}
 +
 
 +
The only difference between <nowiki>{{TBT}} and {{TB}}</nowiki> is that TBT has a <nowiki>|-</nowiki> at the top of it to separate that row from the next. Therefore, it should go at the top of each row.
 +
 
 +
<nowiki>{{TCs|Object to go in field|X}}</nowiki> Will add a "colspan" to the table, where "X" is the number of columns you want to take over. <nowiki>{{TRs|Object to go in field|X}}</nowiki> will do the same, but with rows.
 +
 
 +
<nowiki>{{TRsT|Object to go in field|X}}</nowiki> will do a rowspan for the first column of the table's row. The only difference being that there is a "<nowiki>|-</nowiki>" at the top of it.
 +
 
 +
<nowiki>{{TCRs|Object to go in field|X|Y}}</nowiki> will add both a rowspan and a colspan. "X" is the rowspan number and "Y" is the colspan number in this case.
 +
 
 +
[[Category:Templates]][[Category:Table templates]]
 +
[[sv:Mall:Table]]</noinclude>

Latest revision as of 18:05, September 18, 2014

{{{1}}}

Usage

Main article: Help:Table markup

Typical table structure should be like this:

{{Table|
{{TH|A}}
{{TH|B}}
{{TH|C}}
{{TBT|1}}
{{TB|2}}
{{TB|3}}
{{TBT|4}}
{{TB|5}}
{{TB|6}}
}}

Makes:

A B C
1 2 3
4 5 6

The only difference between {{TBT}} and {{TB}} is that TBT has a |- at the top of it to separate that row from the next. Therefore, it should go at the top of each row.

{{TCs|Object to go in field|X}} Will add a "colspan" to the table, where "X" is the number of columns you want to take over. {{TRs|Object to go in field|X}} will do the same, but with rows.

{{TRsT|Object to go in field|X}} will do a rowspan for the first column of the table's row. The only difference being that there is a "|-" at the top of it.

{{TCRs|Object to go in field|X|Y}} will add both a rowspan and a colspan. "X" is the rowspan number and "Y" is the colspan number in this case.