Category:Collapsible box templates

From Cannabis
Jump to: navigation, search

Expand/collapse table format:

{| class="navbox mw-collapsible mw-collapsed" border=1 cellpadding=4 rules=all 
!Header text. 
|-
|
Text, etc.
|}
border=1 cellpadding=4 rules=all 

is not required. It allows the tables to be copied and pasted into email, web pages, etc., and keep padding in all cells in the table, and keep the single-line borders around all cells.

The default background color and text color in the navbox class is set here: MediaWiki:Common.css. If you change the colors set there it can take 5 to 15 minutes for the color change to show up in table headers using the navbox class.

You can override those colors with this inline styling in the header wikitext:

  • !style="background-color:xxxxx; color:yyyyy;" |

Substitute color names or values for xxxxx and yyyyy. You can choose colors from these lists:

When using inline CSS to set header background color use this

  • style="background-color:xxxxx;"

instead of

  • style="background:xxxxx;"

Otherwise sorting in sortable tables may be broken. See Wikipedia:Help:Sorting, and bug 31755.

For more info see:

style="background-color:white;"

This is needed for some templates that expand into the gray space on the right side when the screen is narrow. For example; this template: