Template:Navbox subgroup/doc

Usage
This template is designed to be used with Navbox or other navigation templates that allow creating lists of links with groups headers or titles. This template allows the creation of subgroups that can be assigned to a list item within Navbox. A subgroup may contain up to 20 list items.

Parameters
This template employs all parameters of Navbox. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and Navbox are as follows: Everything else is exactly the same as Navbox.
 * The border parameter defaults to "child"
 * The group padding defaults to 0.75em on the left/right, and can only be changed with the  parameter.  This is done to prevent the Internet Explorer box model bug from affecting the width of groups.

Only the most common parameters are listed below


 * show†
 * Text to be be displayed in place of [Show] to expand the template


 * hide†
 * Text to be be displayed in place of [Hide] to collapse the template

Cells

 * listn
 * (i.e. list1, list2, ... list20) The body of the template, usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter, if provided (see below). The background color of the list items (and the entire table) defaults to , therefore it displays the same background color used in the parent navigation box.


 * groupn
 * (i.e. group1, group2, ..., group20) If specified, text appears in a header cell displayed to the left of listn. If omitted, listn uses the full width of the table. The background color defaults to, but can be changed via the groupstyle parameter (see below).

Styles

 * bodystyle
 * Specifies styles to apply to the template body. Examples:


 * groupstyle
 * CSS styles to apply to the groupn cells. This option overrides any styles that are applied to the entire table Examples:


 * grouppadding
 * CSS style to specify group padding. Should usually be specified using em units.  It is recommended to leave this parameter alone and use the default padding  Examples:
 * (1em on left/right, 0em on top/bottom)
 * (0em top, 0.5em right, 0em bottom, 1em left)


 * liststyle
 * CSS styles to apply to all lists. Overridden by the oddstyle and evenstyle parameters (if specified) below


 * oddstyle
 * evenstyle
 * CSS styles to apply to the odd-numbered list items (list1, list3, etc) or even-numbered list items (list2, list4, etc), respectively. Typically used to set background color in order to achieve an alternating background color between odd and even-numbered lists


 * evenodd
 * If set to, then the automatic striping of even and odd rows is reversed.  Normally, even rows get a light background for striping; when this parameter is used, the odd rows receive the light striping instead of the even rows.  Setting to   or   sets all rows to have that, same, striping color. Setting to   disables automatic row striping


 * gevenodd
 * If set to, then the automatic striping of even and odd groups is reversed.  Normally, even groups get a light background for striping; when this parameter is used, the odd groups receive the light striping instead of the even rows.  Setting to   or   sets all groups to have that, same, striping color. Setting to   disables automatic group striping

Setting the width of groups
If multiple Navbox subgroup templates are used inside of a parent Navbox, it generally looks better if the width of the groups matches up. In order to do this, one must set the  parameter:



An alternative way is to set the  parameters to contain the desired width, and the   parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each Navbox subgroup to adjust the widths:

If you also use the  or   parameters, then you will most likely also need to set their width manually using the   and   parameters.
 * NOTE: For the  widths to work, you must set the   width to "auto".

Example 1
The following is an example of Navbox subgroup used within a Navbox template.



Example 2
This example implements horizontal group headings by assigning the headings to  and   and the links to   and  ), then using   and   to set the background color of the headings.

