Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
Template:Navbox/doc
(section)
From Guild of Archivists
Namespaces
Template
Discussion
More
More
Page actions
Read
Edit source
History
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 parameters === Styles are generally not recommended as to maintain consistency among templates and pages in Wikipedia. However, the option to modify styles is given. :; ''style''<nowiki>*</nowiki> :: Specifies CSS styles to apply to the template body. The parameter ''bodystyle'' also does the example same thing and can be used in place of this ''style'' parameter. This option should be used sparingly as it can lead to visual inconsistencies. Examples: ::: <code>style = background:#''nnnnnn'';</code> ::: <code>style = width:''N'' [em/%/px or width:auto];</code> ::: <code>style = float:[''left/right/none''];</code> ::: <code>style = clear:[''right/left/both/none''];</code> :; ''basestyle''<nowiki>*</nowiki> :: CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The style are not applied to ''list'' cells. This is convenient for easily changing the basic color of the navbox without having to repeat the style specifications for the different parts of the navbox. Examples: ::: <code>basestyle = background:lightskyblue;</code> :; ''titlestyle''<nowiki>*</nowiki> :: CSS styles to apply to ''title'', most often the titlebar's background color: ::: <code><nowiki>titlestyle = background:</nowiki>''#nnnnnn'';</code> ::: <code><nowiki>titlestyle = background:</nowiki>''name'';</code> :; ''groupstyle''<nowiki>*</nowiki> :: CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples: ::: <code>groupstyle = background:#''nnnnnn'';</code> ::: <code>groupstyle = text-align:[''left/center/right''];</code> ::: <code>groupstyle = vertical-align:[''top/middle/bottom''];</code> :; ''group<sub>n</sub>style''<nowiki>*</nowiki> :: CSS styles to apply to a specific group, in addition to any styles specified by the ''groupstyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples: ::: <code>group3style = background:red;color:white;</code> :; ''liststyle''<nowiki>*</nowiki> :: CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) below. When using backgound colors in the navbox, see the [[#Intricacies|note below]]. :; ''list<sub>n</sub>style''<nowiki>*</nowiki> :: CSS styles to apply to a specific list, in addition to any styles specified by the ''liststyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples: ::: <code>list5style = background:#ddddff;</code> :; ''listpadding''<nowiki>*</nowiki> :: A number and unit specifying the padding in each ''list'' cell. The ''list'' cells come equipped with a default padding of 0.25em on the left and right, and 0em on the top and bottom. Due to complex technical reasons, simply setting "liststyle=padding:0.5em;" (or any other padding setting) will not work. Examples: ::: <code>listpadding = 0.5em 0em; </code> (sets 0.5em padding for the left/right, and 0em padding for the top/bottom.) ::: <code>listpadding = 0em; </code> (removes all list padding.) :; ''oddstyle'' :; ''evenstyle'' ::Applies to odd/even list numbers. Overrules styles defined by ''liststyle''. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances. :; ''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. This advanced parameter should only be used to fix problems when the navbox is being used as a child of another navbox and the stripes do not match up. Examples and a further description can be found in the section on child navboxes below. :; ''abovestyle''<nowiki>*</nowiki> :; ''belowstyle''<nowiki>*</nowiki> :: CSS styles to apply to the top cell (specified via the ''above'' parameter) and bottom cell (specified via the ''below'' parameter). Typically used to set background color or text alignment: ::: <code>abovestyle = background:#''nnnnnn'';</code> ::: <code>abovestyle = text-align:[''left/center/right''];</code> :; ''imagestyle''<nowiki>*</nowiki> :; ''imageleftstyle''<nowiki>*</nowiki> :: CSS styles to apply to the cells where the image/imageleft sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Examples: ::: <code>imagestyle = width:5em;</code> ===== Default styles ===== The style settings listed here are those that editors using the navbox change most often. The other more complex style settings were left out of this list to keep it simple. Most styles are set in [[MediaWiki:Common.css]]. :<code>bodystyle = background:#fdfdfd; width:100%; vertical-align:middle;</code> :<code>titlestyle = background:#ccccff; padding-left:1em; padding-right:1em; text-align:center;</code> :<code>abovestyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code> :<code>belowstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code> :<code>groupstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:right;</code> :<code>liststyle = background:transparent; text-align:left/center;</code> :<code>oddstyle = background:transparent;</code> :<code>evenstyle = background:#f7f7f7;</code> Since ''liststyle'' and ''oddstyle'' are transparent odd lists have the color of the ''bodystyle'', which defaults to #fdfdfd (white with a hint of gray). A list has <code>text-align:left;</code> if it has a group, if not it has <code>text-align:center;</code>. Since only ''bodystyle'' has a vertical-align all the others inherit its <code>vertical-align:middle;</code>.
Summary:
Please note that all contributions to Guild of Archivists may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs