Actions

Template

Prettytable: Difference between revisions

From HacDC Wiki

(starting)
 
No edit summary
 
(One intermediate revision by one other user not shown)
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 30: Line 32:




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

Latest revision as of 04:05, 6 April 2012

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