Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Home
Random page
Pages on topics near you
Recent changes
Special pages
Search
Search
Appearance
Create account
Log in
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Editing
Template
:
Navbox/doc
(section)
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
=== Parameters === ==== Commonly used ==== {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = {{{title}}} | above = {{{above}}} | image = {{{image}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | group3 = {{{group3}}} | list3 = {{{list3}}} | group4 = {{{group4}}} | list4 = {{{list4}}} | below = {{{below}}}<br />''See alternate navbox formats at {{Section link|#Layout of table}}'' }} The navbox uses lowercase parameter names, as shown in the box above. The required [[#Name|{{para|name}}]] and [[#Title|{{para|title}}]] parameters will create a one-line box if no other parameters are defined. Note that the [[#Above|{{para|above}}]], [[#Below|{{para|below}}]] and [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] (etc.) parameters are optional. The basic and most common parameters are as follows (see the {{Section link|#Parameter descriptions}} section below for the full list): * {{Parameter|name}} β the navbox template page name (Wikipedia location). * {{Parameter|title}} β contents of the title bar, such as {{Example link code|Widget stuff}}. * {{Parameter|listclass}} β custom CSS classes (space-delimited if more than one) for all [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells, usually assigned the value {{Code|hlist}} to enable the horizontal formatting of lists; alternatively, use {{Parameter|bodyclass}} to define classes for the entire navbox's {{Tag|div|o}} container tags. * {{Parameter|state}} β controls when a navbox is expanded or collapsed. * {{Parameter|titlestyle}} β custom CSS declarations appended to the full-width title bar's {{Code|code=style="β¦"}} attribute, for example: *: {{Parameter|titlestyle|background-color: var(--background-color-neutral, #eaecf0); color: var(--color-base, #202122);|style=white-space: collapse nowrap;}}. * {{Parameter|groupstyle}} β custom CSS declarations appended to the {{Code|code=style="β¦"|html}} attributes of the table cells for all of the {{Parameter|group{{Sub|{{Var|N}}}}}} parameters, for example: *: {{Parameter|groupstyle|background-color: var(--background-color-disabled, #dadde3); color: var(--color-progressive, #36c);|style=white-space: collapse nowrap;}}. * {{Parameter|above}} β content to appear under the title bar and above the {{Parameter|group{{Sub|{{Var|N}}}}}}{{Spaces|thin}}/{{Spaces|thin}}{{Parameter|list{{Sub|{{Var|N}}}}}} rows (such as a list of wikilinks related to general aspects of the navbox subject). * {{Parameter|image}} β an optional right-side image, formatted as a typically {{pval|File:}} namespace wikilink, such as {{Example link code|File:{{Var|XX}}.jpg|80px{{para|alt|Alternate text}}{{para|link}}}}. * {{Parameter|imageleft}} β an optional left-side image, formatted in the same manner as the {{Parameter|image}} parameter described above. * {{Parameter|group{{Sub|{{Var|N}}}}}} β the content shown in the table cell at the immediate left of {{Parameter|list{{Sub|{{Var|N}}}}}} (if any {{Parameter|group{{Sub|{{Var|N}}}}}} parameter is left undefined, the corresponding {{Parameter|list{{Sub|{{Var|N}}}}}} parameter will receive a full-width, center-aligned table cell (by way of {{Code|code=style="text-align: center;"|class=nowrap}}). * {{Parameter|list{{Sub|{{Var|N}}}}}} β a [[Help:List|wikilist]] formatted series of page links. * {{Parameter|below}} β optional content to appear at the bottom of the navbox directly beneath the {{Parameter|group{{Sub|{{Var|N}}}}}}{{Spaces|thin}}/{{Spaces|thin}}{{Parameter|list{{Sub|{{Var|N}}}}}} rows. ==== Descriptions ==== The following is a complete list of parameters for using {{Template link general|nolink=on|Navbox}}. In most cases, the only required parameters are {{Parameter|name}}, {{Parameter|title}} and {{Parameter|list1}}, though [[#Child navboxes|"child" navboxes]] do not even require those. For consistency and ease of use, this template shares numerous common parameters with its sister templates in the Navbox suite, {{Template link general|Navbox with columns}} and {{Template link general|Navbox with collapsible groups}}. Parameters marked with a preceding superscript orange star ({{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}β¦) are common to all Navbox suite templates. ===== Setup ===== ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|name}}{{Anchor|Name}} : The name of the template, which is needed for the {{VTE|t|e|template=Navbox}} links to work properly on all pages where the template is transcluded; the shortcut value {{Template link general|code=on|subst=on|PAGENAME}} can be assigned as it will be automatically replaced with the correct value when saved. This parameter is only required if the {{Parameter|title}} parameter is defined but neither the {{Parameter|border}} or {{Parameter|navbar}} parameters (which disable the navbar) are as well. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|state|{{Nobold|{{pval|autocollapse}}{{pval|collapsed}}{{pval|expanded}}{{pval|plain}}{{pval|off}}}}}}{{Anchor|Autocollapse}} :* {{Parameter|state|autocollapse}} '''''(default)''''' β The navbox is collapsed if there are two or more additional collapsible elements on the transcluding page, otherwise it will be expanded. For the technically-minded, perform a full-text search for {{pval|autocollapse}} on [[MediaWiki:Common.js]] to review the underlying JavaScript. :* {{Parameter|state|collapsed}} β The navbox always loads in the collapsed state. :* {{Parameter|state|expanded}} β The navbox always loads in the expanded state. :* {{Parameter|state|plain}} β The navbox always loads in the expanded state and the {{Code[hide]}} link on the right is suppressed, while the title remains centered (CSS {{Code|padding:|css}} is used to offset the <small>V β’ T β’ E</small> links). :* {{Parameter|state|off}} β As above, the navbox always loads in the expanded state with no {{Code|[hide]}} link on the right, however no CSS padding is used to keep the title centered. This is for advanced use only; the {{Code|plain}} option should suffice for most instances where the {{Code|[show]}}/{{Code|[hide]}} button needs to be hidden. : To have the navbox load in the expanded state when not transcluded and in the collapsed state when it is, use {{Xtag|noinclude|o}} tags to wrap the value for the non-transcluded behavior (e.g., {{Tag|noinclude|p|content=expanded}}). : Frequently, editors will wish to override a navbox's default initial state in transcluding pages on a case-by-case basis. This is easily accomplished by duplicating the {{Source parameter|state}} parameter in the new navbox and adding a fallback value to it of the desired default behavior keyword wrapped in {{Xtag|includeonly|o}} tags. This allows any explicitly-defined values for the parameter to be passed through as-is to [[Template:Navbox]] without affecting the non-transcluded default state. :* For example, {{Parameter|state|<syntaxhighlight lang="wikitext" inline="1" class="nowrap" style="border: none;">{{{state<includeonly>|desired_default</includeonly>}}}</syntaxhighlight>}} will show the navbox expanded when viewing it on its own template page and yet remain auto-collapsed anywhere else it is transcluded without an explicit value defined for {{Source parameter|state}}. :* A more determinative approach is with {{Parameter|state|<syntaxhighlight lang="wikitext" inline="1" class="nowrap" style="border: none;">{{{state|<includeonly>desired_transcluded_default</includeonly><noinclude>desired_non-transcluded_default</noinclude>}}}</syntaxhighlight>}}, where the parameter value passed to {{Template link general|Navbox}} on the template's own page would be {{Code|desired_non-transcluded_default}} while remaining {{Code|desired_transcluded_default}} wherever the navbox is transcluded. :** Example 1: {{Template link general|Aesthetics}} with {{Code|autocollapse}} as the default initial state. Most articles transclude it alongside other navboxes so it collapses automatically, but it's expanded on its own template page because it is the only navbox present. :** Example 2: {{Template link general|Historical currencies of Hungary}} whose default initial state is {{Code|expanded}} as implemented in the template source code with {{Parameter|state|<syntaxhighlight lang="wikitext" inline="1" class="nowrap" style="border: none;">{{{state<includeonly>|expanded</includeonly>}}}</syntaxhighlight>}}. All transcluding articles show the content by default, unless there is a hypothetical article that specifies {{Template link general|code=on|Historical currencies of Hungary|2=state=collapsed}} when transcluding. :** Example 3: {{Template link general|Alveolata}} with {{Code|collapsed}} as the default initial state, from the parameter configuration {{Parameter|state|<syntaxhighlight lang="wikitext" inline="1" class="nowrap" style="border: none;">{{{state<includeonly>|collapsed</includeonly>}}}</syntaxhighlight>}}. All transcluding articles will show the template as collapsed by default, but the template will still be uncollapsed when displayed on its own page. : The template {{Template link general|Collapsible option}} explains how to use the {{Source parameter|state}} parameter. It can be added to a {{Xtag|noinclude|p}} section after the template definition, or to the instructions on the {{Template link general|Documentation subpage}}. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|navbar|{{Nobold|{{pval|plain}}{{pval|off}}}}}}{{Anchor|Navbar}} :* {{Parameter|navbar|plain}} β Removes the {{Navbar|1={{NAMESPACE}}:{{BASEPAGENAME}}|mini=on}} links on the left side of the titlebar and automatically recalculates the CSS padding values to keep the title visually centered. :* {{Parameter|navbar|off}} β Removes the {{Navbar|1={{NAMESPACE}}:{{BASEPAGENAME}}|mini=on}} links, but does not alter the CSS padding to compensate (this is for advanced use only; the {{Code|plain}} option should suffice for most instances where a navbar is not desired). : It is strongly recommended that the navbar should not be hidden so that users can easily edit the template as needed, and to keep a standard style across pages. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|border|{{Nobold|{{pval|child}}{{pval|subgroup}}{{pval|none}}}}}}{{Anchor|Border}} :* {{Parameter|border|child}} or {{Parameter|border|subgroup}} β Allows the navbox to be used as a borderless child that nests cleanly within another navbox, removing the outer border and the lateral padding so that it fits into one of the {{Parameter|list{{Sub|{{Var|N}}}}}} areas of the parent navbox. :* {{Parameter|border|none}} β Removes the outer border and lateral padding from the navbox so it may be used as the child of another container (do not use the {{Code|none}} option inside of another navbox, only the {{Code|child}}{{Spaces|thin}}/{{Spaces|thin}}{{Code|subgroup}} keyword values are appropriate for nesting navboxes). :* If unset '''''(default)''''', then a regular navbox is displayed with a one-pixel-wide border. An alternate way to specify the border to be a subgroup style is with the first unnamed/positional parameter alias, as {{Template link general|code=on|Navbox|2=child|3=β¦}} :: βΊ {{Hatnote inline|See the {{Section link|#Child navboxes}} section for practical examples and a more complete description of using navboxes within one another.}} ===== Cells ===== ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|title}}{{Anchor|Title}} : Text that appears centered in the top row of the table, usually a succinct description of the template's topic. This should not include any line breaks, but if a second line is needed, use {{Template link general|code=on|-}} to ensure the title remains properly centered. Though this parameter is not technically mandatory, using {{Template link general|Navbox}} is rather pointless without a title. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|above}}{{Anchor|Above}} : A full-width cell displayed between the titlebar and first {{Parameter|group{{Sub|{{Var|N}}}}}}{{Spaces|thin}}/{{Spaces|thin}}{{Parameter|list{{Sub|{{Var|N}}}}}} row, i.e. ''above'' the template's body (groups, lists and image). In navboxes without an image, this parameter behaves in the same way as the {{Parameter|list1}} parameter without the {{Parameter|group1}} parameter. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|group{{Sub|{{Var|N}}}}}}{{Anchor|Group}} : (i.e. {{Parameter|group1}}, {{Parameter|group2}}, etc.) When defined, its value appears in a header cell displayed to the left of the corresponding {{Parameter|list{{Sub|{{Var|N}}}}}} parameter. If undefined, {{Parameter|list{{Sub|{{Var|N}}}}}} uses the full width of the navbox and is center-aligned. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|list{{Sub|{{Var|N}}}}}}{{Anchor|List}} : (i.e. {{Parameter|list1}}, {{Parameter|list2}}, etc.) The fundamental content elements of the navbox, usually each consisting of a list of wikilinks. They are rendered using inline formattingβthough the text can be entered on separate lines if the entire list is enclosed within {{Tag|div|o}} tagsβand may be preceded by a header cell whose content is defined by the corresponding {{Parameter|group{{Sub|{{Var|N}}}}}} parameter. The {{Parameter|list1}} parameter is required, and any additional {{Parameter|list{{Sub|{{Var|N}}}}}} parameters that may be defined are each displayed on a separate row. The keyword values {{Code|child}} or {{Code|subgroup}} are also available to denote that the element is a [[#Child navboxes|nested or "child" navbox]] instance (does not work with {{Template link general|Navbox with columns}} or {{Template link general|Navbox with collapsible groups}}). : List entries should be separated using a [[newline]] followed by an [[asterisk]] ({{Mono|*}}). If instead, multiple asterisks precede an entry, it will be presented as a [[Nesting (computing)|nested]] parenthetical to the previous entry, with each additional asterisk serving to increment the level of [[wiktionary:en:imbrication#English:_programming|imbrication]]. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|image}}{{Anchor|Image}} : An image to be displayed in a cell below the title bar and to the right of the body rows (the groups/lists); requires the {{Parameter|list1}} parameter to be defined. This parameter expects a value in the form of a standard [[Help:Extended image syntax|file wikilink]], e.g., {{Example link code|File:Xxx.jpg|80px{{para|alt}}{{para|class}}{{para|link}}}}. [[Nota bene|N.B.]]: Including the location token {{Parameter||right}} in the file wikilink produces appropriate visual separation for the image from the list cells' [[zebra striping]] as well as individual list items. :: βΊ {{Hatnote inline|Note that the majority of such images do not comply with the policies outlined at [[Wikipedia:Manual of Style/Icons]] and may be subject to removal without warning; additional details can be found at [[Wikipedia:Navigation template]]. An example of a compliant use case would be [[Special:Permalink/995622594|this map showing the location of a region within the state of Kazakhstan]] that is consistently implemented for [[:Category:Regions of Kazakhstan templates|all of that country's regional navbox templates]].}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|imageleft}}{{Anchor|Imageleft}} : An image to be displayed in a cell below the title bar and to the left of the body rows (the groups/lists); requires the {{Parameter|list1}} parameter to be defined and that all {{Parameter|group{{Sub|{{Var|N}}}}}} parameters are unset. Valid values for this parameter must satisfy the same requirements as for the [[#Image|{{para|image}}]] parameter. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|below}}{{Anchor|Below}} : A full-width cell displayed ''below'' the body rows (the groups, lists and images). If neither the [[#Image|{{para|image}}]] or [[#Imageleft|{{para|imageleft}}]] parameters are defined, this parameter behaves in the same way as the final [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameter when its corresponding [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] parameter is unset. An example of a common use case for this parameter can be found at {{Oldid|Template:Hosiery|1329479404|this 2025 version of Template:Hosiery}}. Links placed here that lead to pages outside of the main namespace are customarily identified by prepending {{Template link general|italic=on|Icon|namespace}} and a [[non-breaking space]] to them, following the format: :: ''<syntaxhighlight class="nowrap" lang="wikitext" inline="1">{{Icon|category}}{{Spaces|1|nbsp}}[[:Category:Example|Example]]</syntaxhighlight>''. ===== Style ===== Custom styles are generally advised against in the interest of consistency among pages and templates on Wikipedia, but the option to modify the default CSS styles is provided through parameters detailed below. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|bodystyle}}{{Anchor|Bodystyle}} : Additional [[Cascading Style Sheets|CSS]] declarations to append to the template body defaults; this option should be used sparingly as it can lead to visual inconsistencies. Some examples: :* {{Parameter|bodystyle|background-color: var(--background-color-disabled, #dadde3); color: var(--color-emphasized, #101418);}} :* {{Parameter|bodystyle|clear: {{pval|both}}{{pval|left}}{{pval|right}}{{pval|none}}; float: {{pval|left}}{{pval|right}}{{pval|none}};}} :* {{Parameter|bodystyle|width: [{{Var|N}}em, {{Var|N}}%, {{Var|N}}px, auto];}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|basestyle}}{{Anchor|Basestyle}} : A convenience parameter that greatly simplifies changing the general color scheme of a navbox by appending a set of additional CSS declarations to the defaults for the [[#Title|{{para|title}}]], [[#Above|{{para|above}}]], [[#Below|{{para|below}}]] and all of the [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] cells; note that this parameter has no impact on any of the [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells, though. Example: :* {{Parameter|basestyle|background-color: var(--background-color-content-added, #a3d3ff); color: var(--color-inverted, #fff);}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|titlestyle}}{{Anchor|Titlestyle}} : Additional [[Cascading Style Sheets|CSS]] declarations to append to the defaults for the [[#Title|{{para|title}}]] table cell, most often to customize its background and font colors. Examples: :* {{Parameter|titlestyle|background-color: var(--background-color-option-orange, #ffead4); color: var(--color-base, #202122);}} :* {{Parameter|titlestyle|background: none; color: inherit;}}'' β for no background color'' ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|groupstyle}}{{Anchor|Groupstyle}} : Additional CSS declarations to append to the defaults for each of the [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] cells, overriding any declarations that have been applied to the entire navbox. Examples: :* {{Parameter|groupstyle|background-color: var(--background-color-option-maroon, #f6ebeb); color: var(--color-neutral, #404244);}} :* {{Parameter|groupstyle|text-align: {{pval|left}}{{pval|center}}{{pval|right}}{{pval|justify}}; vertical-align: {{pval|top}}{{pval|middle}}{{pval|bottom}};}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|group{{Sub|{{Var|N}}}}style}}{{Anchor|GroupNstyle}} : Additional CSS declarations to append to the defaults for a specific [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] parameter table cell, in addition to any declarations inherited from the [[#Groupstyle|{{para|groupstyle}}]] parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: :* {{Parameter|group1style|background-color: var(--background-color-option-lime, #e3f2e4); color: var(--color-destructive, #bf3c2c);}} ; {{Parameter|groupwidth}}{{Anchor|Groupwidth}} : A valid CSS length value (typically consisting of numeric and unit suffix components) specifying a uniform width for the [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] cells, in cases where a lack of content in the list cells may cause group cells to be expand undesirably; may be overridden by the [[#GroupNstyle|{{para|group{{Sub|{{Var|N}}}}style}}]] parameter. Example: :* {{Parameter|groupwidth|8rem}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|liststyle}}{{Anchor|Liststyle}} : Additional CSS declarations to append to the defaults for all [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameter table cells; individual declarations can be overridden by declarations of the same CSS properties in the {{Parameter|oddstyle}} and {{Parameter|evenstyle}} parameters, if specified. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|list{{Sub|{{Var|N}}}}style}}{{Anchor|ListNstyle}} : Additional CSS declarations to append to the defaults for a specific [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameter table cell, in addition to any declarations inherited from the [[#Liststyle|{{para|liststyle}}]] parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: :* {{Parameter|list1style|background-color: var(--background-color-success-subtle, #dff2eb); color: var(--color-subtle, #54595d);}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|listpadding}}{{Anchor|Listpadding}} : One or more valid CSS length values (typically consisting of numeric and unit suffix components) specifying the amount of padding in each [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameter table cell. This value must be valid for the CSS {{Code|padding:}} shorthand property ''as-is'', and override the default of 0.25em on the left/right and 0 on the top/bottom. Due to the technical intricacies of this template's structure, it is not possible to set the {{Code|padding:}} property as part of the [[#Liststyle|{{para|liststyle}}]] parameter but only with this one. Examples: :* {{Parameter|listpadding|0 0.5em}} β sets the top/bottom padding width to 0 and the left/right width to 0.5[[Em (typography)|em]] :* {{Parameter|listpadding|0}} β removes all padding for every list cell ; {{Parameter|evenstyle}},{{Anchor|Evenstyle}} ; {{Parameter|oddstyle}}{{Anchor|Oddstyle}} : Additional CSS declarations to append to the defaults for ''only'' the even- or odd-numbered [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameter table cells, respectively, overriding any CSS declarations inherited from the [[#Liststyle|{{para|liststyle}}]] parameter. The default behavior is to produce a zebra stripe appearance by slightly darkening the background of the even-numbered [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells, in order to improve readability; this should not be changed except in extraordinary circumstances. ; {{Parameter|evenodd|{{Nobold|{{pval|swap}}{{pval|even}}{{pval|odd}}{{pval|off}}}}}}{{Anchor|Evenodd}} :* {{Parameter|evenodd|swap}} β reverses the zebra striping pattern, slightly darkening the backgrounds of ''odd''-numbered [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells, instead. :* {{Parameter|evenodd|{{pval|even, odd}}}} β forces all [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells to use the style for the named group, creating a uniform appearance. :* {{Parameter|evenodd|off}} β disables zebra stripe styling altogether and sets all of the [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells transparent. ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|abovestyle}},{{Anchor|Abovestyle}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|belowstyle}}{{Anchor|Belowstyle}} : Additional CSS declarations to append to the defaults for the table cells defined by the [[#Above|{{para|above}}]] or [[#Below|{{para|below}}]] parameters, respectively; typically used to customize theme colors or text alignment. Examples: :* {{Parameter|abovestyle|background-color: var(--background-color-error, #f54739); color: var(--color-inverted, #fff);}} :* {{Parameter|belowstyle|text-align: {{pval|left}}{{pval|center}}{{pval|right}}{{pval|justify}};}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|imagestyle}},{{Anchor|Imagestyle}} ; {{Color|var(--color-option-orange, #a95226)|{{Sup|β }}}}{{Spaces|1|fig}}{{Parameter|imageleftstyle}}{{Anchor|Imageleftstyle}} : Additional CSS declarations to append to the table cell defaults for the [[#Image|{{para|image}}]] and [[#Imageleft|{{para|imageleft}}]] parameters. These styles should only be used in exceptional circumstances, such as fixing width problems that can arise when all the [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] parameters have too few entries. Example: :* {{Parameter|imagestyle|width: [{{Var|N}}em, {{Var|N}}%, {{Var|N}}px, auto];}} ====== Default styles ====== The style parameters shown below are those that editors using {{Template link general|nolink=on|Navbox}} customize most often; the other more complex style settings were left out of this list to keep it concise. If you need to discover defaults for any omitted parameters, consult the [[single source of truth]] for these styles at [[Module:Navbox]] and [[Module:Navbox/styles.css]]. {| class="wikitable" |+ Default CSS declarations for style parameters ! Parameter ! Declarations |- | {{Parameter|bodystyle}} | style="font-size: 0.83rem;" | {{code|background-color: #fdfdfd; color: inherit; vertical-align: middle; width: 100%;}} |- | {{Parameter|titlestyle}} | style="font-size: 0.83rem;" | {{code|background-color: #ccf; line-height: 1.5em; padding: 0.25em 1em; text-align: center;}} |- | {{Parameter|abovestyle}} | style="font-size: 0.83rem;" | {{code|background-color: #ddf; line-height: 1.5em; padding: 0.25em 1em; text-align: center;}} |- | {{Parameter|belowstyle}} | style="font-size: 0.83rem;" | {{code|background-color: #ddf; line-height: 1.5em; padding: 0.25em 1em; text-align: center;}} |- | {{Parameter|groupstyle}} | style="font-size: 0.83rem;" | {{code|background-color: #ddf; line-height: 1.5em; padding: 0.25em 1em; text-align: right; white-space: nowrap;}} |- | {{Parameter|liststyle}} | style="font-size: 0.83rem;" | {{code|border-color: #fdfdfd; border-left: var(--spacing-12, 2px) var(--border-style-base, solid); text-align: left/center;}} |- | {{Parameter|evenstyle}} | style="font-size: 0.83rem;" | {{code|background-color: #f7f7f7; color: inherit; line-height: 1.5em;}} |- | {{Parameter|oddstyle}} | style="font-size: 0.83rem;" | {{code|background-color: transparent; color: inherit; line-height: 1.5em;}} |} Since [[#Oddstyle|{{para|oddstyle}}]] has a transparent background, odd list table cells will have the color defined by the [[#Bodystyle|{{para|bodystyle}}]] parameter: {{pval|#fdfdfd|bg-color=#fdfdfd}} by default (white with a hint of gray). Individual [[#List|{{para|list{{Sub|{{Var|N}}}}}}]] cells whose corresponding [[#Group|{{para|group{{Sub|{{Var|N}}}}}}]] is also defined default to {{Code|text-align: left;}}, and if it is not the default becomes {{Code|text-align: center;}}. Since only the [[#Bodystyle|{{para|bodystyle}}]] parameter has a default declaration for the {{Code|vertical-align:}} property, all the others inherit it.
Summary:
Please note that all contributions to Wikifacta are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International License. A few of Wikifacta's pages are from Wikipedia.org's Mainspace and Draftspace. (see
Wikifacta:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Template
:
Navbox/doc
(section)
Add topic