Actions

Template

Difference between revisions of "Prettytable"

From HacDC Wiki

(starting)
 
(finished initial, base taken from Mediawiki)
Line 1: Line 1:
width="{{{width|auto}}}" cellspacing="4" cellpadding="3" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #bcc; border-collapse:collapse; empty-cells:show; {{{style|}}}"
<includeonly>width="{{{width|auto}}}" cellspacing="4" cellpadding="3" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #bcc; border-collapse:collapse; empty-cells:show; {{{style|}}}"</includeonly><noinclude>
<noinclude>
This template can be used within a table to provide basic styling that's probably more in-line with what the user is expecting.
This template can be used within a table to provide basic styling more in-line with conventional table structures.  


;Example
 
: This: <nowiki>{|
'''This:'''
: <font style="white-space:pre-wrap;"><nowiki>{|
! A  !! B  !! C
! A  !! B  !! C
|-
|-
| one cell || two cell || three cell
| one cell || two cell || three cell
|}
|}
</nowiki>
</nowiki></font>
Renders as:  
'''Renders as: '''
{|
{|
! A  !! B  !! C
! A  !! B  !! C
Line 16: Line 16:
| one cell || two cell || three cell
| one cell || two cell || three cell
|}
|}
: And this: <nowiki>{| {{Prettytable}}
 
 
; While this: <font style="white-space:pre-wrap;"><nowiki>{| {{Prettytable}}
! A  !! B  !! C
! A  !! B  !! C
|-
|-
| one cell || two cell || three cell
| one cell || two cell || three cell
|}
|}
</nowiki>
</nowiki></font>
Renders as:
'''Renders as:'''
{| {{Prettytable}}
{| {{Prettytable}}
! A  !! B  !! C
! A  !! B  !! C
Line 28: Line 30:
| one cell || two cell || three cell
| one cell || two cell || three cell
|}
|}




[[Category:Utility templates|{{PAGENAME}}]]
[[Category:Utility templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 16:30, 2 November 2010

This template can be used within a table to provide basic styling that's probably more in-line with what the user is expecting.


This:

{| ! A  !! B  !! C |- | one cell || two cell || three cell |}

Renders as:

A B C
one cell two cell three cell


While this
{| {{Prettytable}} ! A  !! B  !! C |- | one cell || two cell || three cell |}

Renders as:

A B C
one cell two cell three cell