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!
===== 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