Editing
Template:DefTable
From PWI Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
style="background:{{{bkg|#171513}}}; padding: {{{padwid|2}}}px {{{padhgt|2}}}px; border: {{{bdrwid|1}}}px {{{bdrparam|solid}}} {{{bdrcolor|#B2B2B2}}}; text-align: {{{txtalgn|inherit}}};" border="{{{cellbdrwid|1}}}" cellpadding="{{{cellpad|4}}}"<noinclude> ---- This is a '''default table header''' (DefTable) for use in standard tables to provide a uniform look and to make it easier to update all/most tables simultaneously should the wiki's style (CSS) be updated again. ===Parameters=== Normally it is recommended that you do not use any of the parameters so that the wiki has a consistent look. However, the DefTable template supports the following parameters for use in special cases: :'''txtalgn''' - The alignment of the text within the cells, defaults to '''inherit'''. Parameter options are "left", "center", "right", "justify", and "inherit". (Note that with "inherit", cells that start with "!" default to being centered and bold, while the rest of the cells are left aligned and not bolded.) :'''bkg''' - The table's background color, defaults to '''#171513'''. (It is recommended that you ''do not'' override this default value.) :'''padwid''' - The width of the padding on the left and right sides of the table, defaults to '''2'''. :'''padhgt''' - The height of the padding on the top and bottom of the table, defaults to '''2'''. :'''bdrwid''' - The width of the line around the outside of the table, defaults to '''1'''. :'''bdrcolor''' - The color of the line around the table, defaults to '''#B2B2B2'''. (It is recommended that you ''do not'' override this default value.) :'''bdrparam''' - Used for other border parameters, defaults to '''solid'''. :'''cellbdrwid''' - The width of the line around each cell inside the table, defaults to '''1'''. :'''cellpad''' - The amount of padding between the text and the sides of the table, defaults to '''4'''. '''NOTE:''' It is recommended that you ''do not'' change the color parameters. This is because if the colors in this template get updated to match a new wiki style/color scheme, your table will not be updated to match it. ===Examples=== This template should normally be used as in the following example: {<nowiki>| {{DefTable}}</nowiki> |+ <nowiki>'''Example Table'''</nowiki> |- ! Column ! Headers |- ! Wide Row | Wide example text |- ! Note | Alignment |} Which produces the following table: {| {{DefTable}} |+ '''Example Table''' |- ! Column ! Headers |- ! Wide row | Wide example text |- ! Note | Alignment |} Or, in special cases, it can be used with parameters, as in this example: {<nowiki>| {{DefTable|bkg=#000000|padwid=0|padhgt=0|cellpad=10|txtalgn=center}} cellspacing="0"</nowiki> |+ <nowiki>'''Example Table'''</nowiki> |- ! Column ! Headers |- ! Wide Row | Wide example text |- ! Note | Alignment |} Which produces the following table: {| {{DefTable|bkg=#000000|padwid=0|padhgt=0|cellpad=10|txtalgn=center}} cellspacing="0" |+ '''Example Table''' |- ! Column ! Headers |- ! Wide row | Wide example text |- ! Note | Alignment |} For comparison, here is how the same table looks without using the DefTable template at all, and instead only using the "border=1" parameter in the table header: {<nowiki>| border=1</nowiki> |+ <nowiki>'''Example Table'''</nowiki> |- ! Column ! Headers |- ! Wide row | Wide example text |- ! Note | Alignment |} {| border=1 |+ '''Example Table''' |- ! Column ! Headers |- ! Wide row | Wide example text |- ! Note | Alignment |} And ''that's'' why you should use the DefTable template when including tables. </noinclude>
Summary:
Please note that all contributions to PWI Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
PWpedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:DefTable
(
edit
)
Navigation menu
Page actions
Template
Discussion
Read
Edit
History
Page actions
Template
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information