# வார்ப்புரு:Navbox/doc

## Parameter descriptions

### Style parameters

Styles are generally advised against, to maintain consistency among templates and pages in Wikipedia; but the option to modify styles is given.  
:; *style**
:: Specifies CSS styles to apply to the template body. The parameter *bodystyle* also does the exact 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*&nbsp;[em/%/px or width: auto];</code>
::: <code>style = float: [*//*];</code>
::: <code>style = clear: [*//both/*];</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. Examples:
::: <code>basestyle = background: lightskyblue;</code>
:; *titlestyle**
:: CSS styles to apply to *title*, most often the titlebar's background color:
::: <code>titlestyle = background: *#nnnnnn*;</code>
::: <code>titlestyle = background: *name*;</code>
:; *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: [*//*];</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. Examples:
::: <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. Examples:
::: <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 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. Examples:
::: <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 and , 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 /, and 0 padding for the top/bottom.)
::: <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><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**
:; *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: [*//*];</code>
::: <code>belowstyle = background: #*nnnnnn*;</code>
::: <code>belowstyle = text-align: [*//*];</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. 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 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-: 1em; padding-: 1em; text-align: ;</code>
: <code>abovestyle = background: #ddddff; padding-: 1em; padding-: 1em; text-align: ;</code>
: <code>belowstyle = background: #ddddff; padding-: 1em; padding-: 1em; text-align: ;</code>
: <code>groupstyle = background: #ddddff; padding-: 1em; padding-: 1em; text-align: ;</code>
: <code>liststyle = background: transparent; text-align: /;</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 defaults to <code>text-align: ;</code> if it has a group, if not it defaults to <code>text-align: ;</code>. Since only *bodystyle* has a vertical-align all the others inherit its <code>vertical-align: middle;</code>.