Editing
Template:Navbox/doc
(section)
Jump to navigation
Jump to search
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 advised against, to maintain consistency among templates and pages in Wikipedia; but the option to modify styles is given. ; ''bodystyle''* : Specifies [[Cascading Style Sheets|CSS]] styles to apply to the template body. This option should be used sparingly as it can lead to visual inconsistencies. Examples: :* <code>bodystyle = background: #''nnnnnn'';</code> :* <code>bodystyle = width: ''N'' [em/%/px or width: auto];</code> :* <code>bodystyle = float: [''left/right/none''];</code> :* <code>bodystyle = clear: [''right/left/both/none''];</code> ; ''basestyle''* : CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The styles 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. Example: <code>basestyle = background: lightskyblue;</code> ; ''titlestyle''* : [[Cascading Style Sheets|CSS]] styles to apply to ''title'', most often the titlebar's background color: :* <code>titlestyle = background: ''#nnnnnn'';</code> :* <code>titlestyle = background: ''name'';</code> :* <code>titlestyle = background: none;</code> β for no background color ; ''groupstyle''* : 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''* : 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. Example: <code>group3style = background: red; color: white;</code> ; ''groupwidth'' : A number and unit specifying a uniform width for the group cells, in cases where little content in the list cells may cause group cells to be too wide. No default. However, may be overridden by the ''group(n)style'' parameter. Example: <code>groupwidth = 9em</code> ; ''liststyle''* : CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) hereafter. When using backgound colors in the navbox, see the [[#Intricacies|note hereafter]]. ; ''list<sub>n</sub>style''* : 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. Example: <code>list5style = background: #ddddff;</code> ; ''listpadding''* : 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 0 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 0;</code> (sets 0.5em padding for the top/bottom, and 0 padding for the left/right.) :* <code>listpadding = 0;</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. ; ''abovestyle''* ; ''belowstyle''* : 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> :* <code>belowstyle = background: #''nnnnnn'';</code> :* <code>belowstyle = text-align: [''left/center/right''];</code> ; ''imagestyle''* ; ''imageleftstyle''* : 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. Example: <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]]. <syntaxhighlight lang="css"> bodystyle = background: #fdfdfd; width: 100%; vertical-align: middle; titlestyle = background: #ccccff; padding-left: 1em; padding-right: 1em; text-align: center; abovestyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; belowstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; groupstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: right; liststyle = background: transparent; text-align: left/center; oddstyle = background: transparent; evenstyle = background: #f7f7f7; </syntaxhighlight> 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 defaults to <code>text-align: left;</code> if it has a group, if not it defaults to <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 Mirrorplay: Fae are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
MPFae: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)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information