Difference between revisions of "Template:Navbox subgroup/doc"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(doc update)
(updated)
Line 1: Line 1:
 
<includeonly>{{template doc page transcluded}} {{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
 
<includeonly>{{template doc page transcluded}} {{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
+
{{Navbox suite}}
This template is designed to be used with {{tl|Navbox}} or other [[Wikipedia:Navigational templates|navigational template]]s 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 {{tl|Navbox}} or {{tl|Navbox generic}}. A subgroup may contain up to 12 list items.
+
This template is designed to be used with {{tl|Navbox}} or other [[Wikipedia:Navigational templates|navigational template]]s 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 {{tl|Navbox}}. A subgroup may contain up to 20 list items.
  
 
== Blank template ==
 
== Blank template ==
 
<pre>
 
<pre>
 
{{Navbox subgroup
 
{{Navbox subgroup
| bodystyle  =
 
 
| groupstyle =  
 
| groupstyle =  
 
| liststyle  =  
 
| liststyle  =  
| oddstyle  =
+
 
| evenstyle  =
 
 
| group1 =  
 
| group1 =  
 
| list1  =  
 
| list1  =  
Line 17: Line 15:
 
| list2  =  
 
| list2  =  
 
...
 
...
| group12 =  
+
| group20 =  
| list12 =  
+
| list20 =  
 
}}
 
}}
 
</pre>
 
</pre>
  
 
== Parameters ==
 
== Parameters ==
 +
This template employs all parameters of {{t1|Navbox}}.  Please see the documentation there for more complete descriptions.  In fact, the only differences between this template and {{t1|Navbox}} are as follows:
 +
*The border parameter defaults to "child"
 +
*The group padding defaults to 0.75em on the left/right, and can only be changed with the <code>groupwidth</code> parameter.  This is done to prevent the [[Internet Explorer box model bug]] from effecting the width of groups.
 +
Everything else is ''exactly'' the same as {{t1|Navbox}}.
 +
 +
Only the most common parameters are listed below.
 
=== Cells ===
 
=== Cells ===
 
:; ''list<sub>n</sub>''
 
:; ''list<sub>n</sub>''
::  (i.e. ''list1'', ''list2'', ... ''list12'') 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 ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). The background color of the list items (and the entire table) defaults to <code>transparent</code>, therefore it displays the same background color used in the parent navigation box.
+
::  (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 ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). The background color of the list items (and the entire table) defaults to <code>transparent</code>, therefore it displays the same background color used in the parent navigation box.
  
 
:; ''group<sub>n</sub>''
 
:; ''group<sub>n</sub>''
:: (i.e. ''group1'', ''group2'', ... ''group12'') If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. The background color defaults to <code><span style="background:#ddf; color:black;">#ddf</span></code> (a truncated form of <code><span style="background: #ddddff;">#ddddff</span></code>), but can be changed via the ''groupstyle'' parameter (see below).
+
:: (i.e. ''group1'', ''group2'', ..., ''group20'') If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. The background color defaults to <code><span style="background:#ddf; color:black;">#ddf</span></code> (a truncated form of <code><span style="background: #ddddff;">#ddddff</span></code>), but can be changed via the ''groupstyle'' parameter (see below).
  
 
=== Styles ===
 
=== Styles ===
Line 37: Line 41:
  
 
:; ''groupstyle''
 
:; ''groupstyle''
:: CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples:
+
:: CSS styles to apply to the ''group<sub>n</sub>'' cells. This option overrides any styles that are applied to the entire table. Examples:
 
::: <code>background:#''nnnnnn'';</code>
 
::: <code>background:#''nnnnnn'';</code>
 
::: <code>text-align:[''left/center/right''];</code>
 
::: <code>text-align:[''left/center/right''];</code>
Line 50: Line 54:
 
:: 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 (<code>background:#''nnnnnn'';</code>) in order to achieve an alternating background color between odd and even-numbered lists.
 
:: 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 (<code>background:#''nnnnnn'';</code>) in order to achieve an alternating background color between odd and even-numbered lists.
  
== Example 1 ==
+
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span>
 +
:: If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed.  Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows.  Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color.  Setting to <code>off</code> disables automatic row striping.
 +
 
 +
==Setting the width of groups==
 +
If multiple {{t1|Navbox subgroup}} templates are used inside of a parent {{t1|Navbox}}, it generally looks better if the width of the groups matches up.  In order to do this, one must set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons).  For example, place the following code in each {{t1|Navbox subgroup}} to adjust the widths:
 +
:<code>groupstyle = width:10em;</code>
 +
:<code>liststyle = width:auto;</code>
 +
 
 +
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters.
 +
 
 +
==Examples==
 +
=== Example 1 ===
 
The following is an example of ''Navbox subgroup'' used within a ''Navbox'' template. Below that is the code used to generate this navigation box, with the subgroup template shown in '''bold''' text.
 
The following is an example of ''Navbox subgroup'' used within a ''Navbox'' template. Below that is the code used to generate this navigation box, with the subgroup template shown in '''bold''' text.
  
 
{{Navbox
 
{{Navbox
| state  = expanded
+
| state  = uncollapsed
 
| name  = Protected Areas of Colorado
 
| name  = Protected Areas of Colorado
 
| title  = Protected Areas of Colorado
 
| title  = Protected Areas of Colorado
| liststyle = background-color: transparent;
 
 
| group1 = National Park Service
 
| group1 = National Park Service
 
| list1  =
 
| list1  =
Line 74: Line 88:
 
}}
 
}}
  
<table class="wikitable"><tr><td>
+
<pre style="overflow:scroll;">
<code><nowiki>{{Navbox</nowiki><br/>
+
{{Navbox
| name  = Protected Areas of Colorado<br/>
+
| name  = Protected Areas of Colorado
| title  = Protected Areas of Colorado<br/>
+
| title  = Protected Areas of Colorado
| liststyle = background-color: transparent;<br/>
+
| group1 = National Park Service
| group1 = National Park Service<br/>
+
| list1  =  
| list1  = <br/><b>
+
  {{Navbox subgroup
&nbsp;&nbsp;<nowiki>{{Navbox subgroup</nowiki><br/>
+
  |group1 = National Parks
&nbsp;&nbsp;| group1 = National Parks<br/>
+
  |list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]
&nbsp;&nbsp;| list1  = <nowiki>[[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]</nowiki><br/>
+
  |group2 = National Monuments
&nbsp;&nbsp;| group2 = National Monuments<br/>
+
  |list2  = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]
&nbsp;&nbsp;| list2  = <nowiki>[[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]</nowiki><br/>
+
  |group3 = National Historic Sites
&nbsp;&nbsp;| group3 = National Historic Sites<br/>
+
  |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
&nbsp;&nbsp;| list3  = <nowiki>[[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]</nowiki><br/>
+
  |group4 = National Recreation Area
&nbsp;&nbsp;| group4 = National Recreation Area<br/>
+
  |list4  = [[Curecanti National Recreation Area|Curecanti]]
&nbsp;&nbsp;| list4  = <nowiki>[[Curecanti National Recreation Area|Curecanti]]</nowiki><br/>
+
  }}
&nbsp;&nbsp;}}</b><br/>
+
| group2 = National Forests
| group2 = National Forests<br/>
+
| list2  = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]
| list2  = <nowiki>[[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]</nowiki><br/>
+
}}
}}</code><br/>
+
</pre>
</td></tr></table>
 
  
== Example 2 ==
+
=== Example 2 ===
 
This example implements horizontal group headings by assigning the headings to odd-numbered rows (<code>list1, list3</code>) and the links to even-numbered rows (<code>list2, list4</code>), then using <code>oddstyle</code> to set the background color.
 
This example implements horizontal group headings by assigning the headings to odd-numbered rows (<code>list1, list3</code>) and the links to even-numbered rows (<code>list2, list4</code>), then using <code>oddstyle</code> to set the background color.
  
Line 103: Line 116:
 
| name  = Roman Emperors
 
| name  = Roman Emperors
 
| title = Roman Emperors
 
| title = Roman Emperors
| liststyle = background-color: transparent;
 
 
| group1 = Crisis 235 AD - 284 AD
 
| group1 = Crisis 235 AD - 284 AD
 
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
 
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
Line 109: Line 121:
 
| list2  =  
 
| list2  =  
 
   {{Navbox subgroup
 
   {{Navbox subgroup
  | oddstyle = background:#ddf;
+
  |list1style = background:#ddf;
  | list1 = '''284 AD - 395 AD'''
+
  |list1 = '''284 AD - 395 AD'''
  | list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
+
  |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
  | list3 = '''Western Empire (393 AD - 476 AD)'''
+
  |list3style = background:#ddf;
  | list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
+
  |list3 = '''Western Empire (393 AD - 476 AD)'''
 +
  |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
 
   }}
 
   }}
 
}}
 
}}
  
<table class="wikitable"><tr><td>
+
<pre style="overflow:scroll;">
<code><nowiki>{{Navbox</nowiki><br/>
+
{{Navbox
| name  = Roman Emperors<br/>
+
| name  = Roman Emperors
| title = Roman Emperors<br/>
+
| title = Roman Emperors
| liststyle = background-color: transparent;<br/>
+
| group1 = Crisis 235 AD - 284 AD
| group1 = Crisis 235 AD - 284 AD<br/>
+
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
| list1  = <nowiki>[[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]</nowiki><br/>
+
| group2 = Dominate
| group2 = Dominate<br/>
+
| list2  =  
| list2  = <br/><b>
+
  {{Navbox subgroup
&nbsp;&nbsp;<nowiki>{{Navbox subgroup</nowiki><br/>
+
  |list1style = background:#ddf;
&nbsp;&nbsp;| oddstyle = background:#ddf;<br/>
+
  |list1 = '''284 AD - 395 AD'''
&nbsp;&nbsp;| list1 = '''284 AD - 395 AD'''<br/>
+
  |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
&nbsp;&nbsp;| list2 = <nowiki>[[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]</nowiki><br/>
+
  |list3style = background:#ddf;
&nbsp;&nbsp;| list3 = '''Western Empire (393 AD - 476 AD)'''<br/>
+
  |list3 = '''Western Empire (393 AD - 476 AD)'''
&nbsp;&nbsp;| list4 = <nowiki>[[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]</nowiki><br/>
+
  |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
&nbsp;&nbsp;}}</b><br/>
+
&nbsp;&nbsp;}}
}}</code><br/>
+
}}
</td></tr></table>
+
</pre>
  
 
<includeonly>
 
<includeonly>

Revision as of 02:20, 5 May 2008

Template:Template doc page viewed directly

This template is designed to be used with {{Navbox}} or other navigational 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.

Blank template

{{Navbox subgroup
| groupstyle = 
| liststyle  = 

| group1 = 
| list1  = 
| group2 = 
| list2  = 
...
| group20 = 
| list20  = 
}}

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:

  • The border parameter defaults to "child"
  • The group padding defaults to 0.75em on the left/right, and can only be changed with the groupwidth parameter. This is done to prevent the Internet Explorer box model bug from effecting the width of groups.

Everything else is exactly the same as {{Navbox}}.

Only the most common parameters are listed below.

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 transparent, 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 #ddf (a truncated form of #ddddff), but can be changed via the groupstyle parameter (see below).

Styles

bodystyle
Specifies CSS styles to apply to the template body. Examples:
background:#nnnnnn;
text-align:[right/center/left/justified];
groupstyle
CSS styles to apply to the groupn cells. This option overrides any styles that are applied to the entire table. Examples:
background:#nnnnnn;
text-align:[left/center/right];
vertical-align:[top/middle/bottom];
white-space:nowrap;
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 (background:#nnnnnn;) in order to achieve an alternating background color between odd and even-numbered lists.
evenodd [swap, even, odd, off]
If set to swap, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to even or odd sets all rows to have that striping color. Setting to off disables automatic row 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 groupstyle parameters to contain the desired width, and the liststyle parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{Navbox subgroup}} to adjust the widths:

groupstyle = width:10em;
liststyle = width:auto;

If you also use the image or imageleft parameters, then you will most likely also need to set their width manually using the imagestyle and imageleftstyle parameters.

Examples

Example 1

The following is an example of Navbox subgroup used within a Navbox template. Below that is the code used to generate this navigation box, with the subgroup template shown in bold text.

{{Navbox
| name   = Protected Areas of Colorado
| title  = Protected Areas of Colorado
| group1 = National Park Service
| list1  = 
  {{Navbox subgroup
   |group1 = National Parks
   |list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]
   |group2 = National Monuments
   |list2  = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]
   |group3 = National Historic Sites
   |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   |group4 = National Recreation Area
   |list4  = [[Curecanti National Recreation Area|Curecanti]]
  }}
| group2 = National Forests
| list2  = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]
}}

Example 2

This example implements horizontal group headings by assigning the headings to odd-numbered rows (list1, list3) and the links to even-numbered rows (list2, list4), then using oddstyle to set the background color.

{{Navbox
| name  = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
| group2 = Dominate
| list2  = 
  {{Navbox subgroup
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
   |list3style = background:#ddf;
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
  }}
}}