Add section headers |
→Creating collapsible tables: add meat |
||
Line 84: | Line 84: | ||
== Creating collapsible tables == | == Creating collapsible tables == | ||
=== Example === | === Example === | ||
{| class="navbox collapsible collapsed" width="100%" | |||
! class="infoboxheader" colspan="2" align="left" | Heading | |||
|- | |||
| Content goes here | |||
|} | |||
* Collapsed: If ''collapsed'' is set, the table will be collapsed initially. If you want the table to be expanded initially, omit collapsed. | |||
* Autocollapse: If ''autocollapse'' is set, the table will only be expanded initially if it's the only collapsible table on the page. If there are more, it'll be collapsed initially. | |||
Note: You can make any table collapsible, not just navboxes. Simply add <code>class="collapsible"</code>. | |||
=== Code === | === Code === | ||
<pre> | |||
{| class="navbox collapsible collapsed" width="100%" | |||
! class="infoboxheader" colspan="2" align="left" | Heading | |||
|- | |||
| Content goes here | |||
|} | |||
</pre> | |||
== Creating sortable tables == | == Creating sortable tables == |
Revision as of 11:08, 8 June 2007
| |||||
To help you understand how to use the new "Styles" that have been installed, this reference article has been created to tell you the most basic options on how to create "cross-compatible" elements with all the styles. This happens because each style has their own CSS file and their own colors. So no matter how you look at the elements, they always show up the same way. These are the major ones so that's why they are here.
Creating Infoboxes[edit]
Example[edit]
class="infoboxheader" | |
Overall Class: | class="infobox" |
- infobox: Always pushes table to the right
- infoboxheader: Highlight a row or cell.
Code[edit]
{| class="infobox" |- class="infoboxheader" | colspan="2" style="text-align: center;" | class="infoboxheader" |- | style="white-space: nowrap;"| '''Overall Class:''' | class="infobox" |}
Creating Message Box[edit]
Example[edit]
| |||||
- Heading: Will appear in bold on top of the message box.
- Message: The content of the message box
- ID: ID of the message box. If set, you can jump to the messagebox with PAGENAME#ID
- Image: The image that should be shown in the left column, without the Image: prefix.
- Shortcut: Contents of the shortcut box. If unset, the shortcut box will be hidden.
Code[edit]
{{message box
|heading= Heading
|message= Message goes here<br/>Message can span multiple lines, but make sure to use <nowiki><br/></nowiki> to separate them.
|id= messagebox1
|image= BSG_WIKI_Project.png
|shortcut= BW:CSS
}}
Creating Content Boxes[edit]
Example[edit]
| ||
---|---|---|
class="contentbox" |
- contentbox: Used on the overall table
- contentbox-th: If you are going to have a table caption, you need this.
- contentbox-header: Used on internal table that is inside "contentbox"
Code[edit]
{| class="contentbox" width="100%" cellpadding="2" cellspacing="5"
! class="contentbox-th" | <!-- Nothing ever goes here -->
{| class="contentbox-header"
| {{Click|image=BSG WIKI Joe.png|link=#Intro|width=25px|height=25px}}
| class="contentbox-header"
|}
|-
| class="contentbox"
|-
|}
Creating collapsible tables[edit]
Example[edit]
Heading | |
---|---|
Content goes here |
- Collapsed: If collapsed is set, the table will be collapsed initially. If you want the table to be expanded initially, omit collapsed.
- Autocollapse: If autocollapse is set, the table will only be expanded initially if it's the only collapsible table on the page. If there are more, it'll be collapsed initially.
Note: You can make any table collapsible, not just navboxes. Simply add class="collapsible"
.
Code[edit]
{| class="navbox collapsible collapsed" width="100%" ! class="infoboxheader" colspan="2" align="left" | Heading |- | Content goes here |}