Difference between revisions of "Template:Prettytable"

From GTAMods Wiki
Jump to navigation Jump to search
(Created Prettytable template same as the one on meta.wikimedia.org)
 
(temp. replaced with class="wikitable")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"
+
<includeonly>class="wikitable"</includeonly><noinclude>Use this template to make a [[Wikipedia:Help:Table|table]] looks cute.
 +
 
 +
=== Example without <nowiki>{{Prettytable}}</nowiki> ===
 +
<pre>
 +
{|
 +
|+Header
 +
!Title 1
 +
!Title 2
 +
|-
 +
|Cell 1 || Cell 2
 +
|-
 +
|colspan="2"| Row 2
 +
|}
 +
</pre>
 +
 
 +
''produces''
 +
 
 +
{|
 +
|+Header
 +
!Title 1
 +
!Title 2
 +
|-
 +
|Cell 1 || Cell 2
 +
|-
 +
|colspan="2"| Row 2
 +
|}
 +
 
 +
=== Example with <nowiki>{{Prettytable}}</nowiki> ===
 +
 
 +
<pre>
 +
{| {{Prettytable}}
 +
|+Header
 +
!Title 1
 +
!Title 2
 +
|-
 +
|Cell 1 || Cell 2
 +
|-
 +
|colspan="2"| Row 2
 +
|}
 +
</pre>
 +
 
 +
''produces''
 +
 
 +
{| {{Prettytable}}
 +
|+Header
 +
!Title 1
 +
!Title 2
 +
|-
 +
|Cell 1 || Cell 2
 +
|-
 +
|colspan="2"| Row 2
 +
|}
 +
 
 +
</noinclude>

Latest revision as of 10:43, 16 March 2012

Use this template to make a table looks cute.

Example without {{Prettytable}}

{| 
|+Header
!Title 1
!Title 2
|-
|Cell 1 || Cell 2
|-
|colspan="2"| Row 2 
|}

produces

Header
Title 1 Title 2
Cell 1 Cell 2
Row 2

Example with {{Prettytable}}

{| {{Prettytable}}
|+Header
!Title 1
!Title 2
|-
|Cell 1 || Cell 2
|-
|colspan="2"| Row 2 
|}

produces

Header
Title 1 Title 2
Cell 1 Cell 2
Row 2