Editing Template:Navboxdl/doc
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.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 75: | Line 75: | ||
:; ''border''<nowiki>*</nowiki> | :; ''border''<nowiki>*</nowiki> | ||
:: ''See section below on using navboxes within one another for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snuggly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter): | :: ''See section below on using navboxes within one another for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snuggly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter): | ||
− | :::<code><nowiki>{{ | + | :::<code><nowiki>{{Navbox|child</nowiki></code> |
− | ::::<code> | + | ::::<code>... |
:::<code><nowiki>}}</nowiki></code> | :::<code><nowiki>}}</nowiki></code> | ||
− | === | + | === Cells === |
:; ''title''<nowiki>*</nowiki> | :; ''title''<nowiki>*</nowiki> | ||
− | :: Text that appears centered in the top row of the | + | :: Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>{{-}}</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title. |
:; ''group<sub>n</sub>''<nowiki>*</nowiki> | :; ''group<sub>n</sub>''<nowiki>*</nowiki> | ||
Line 93: | Line 93: | ||
;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption. | ;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption. | ||
− | + | == Layout of table == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Layout of | ||
Table generated by {{tl|Navboxdl}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): | Table generated by {{tl|Navboxdl}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): | ||
{{Navboxdl | {{Navboxdl | ||
Line 152: | Line 111: | ||
*This template uses CSS classes for most of its looks, thus it is fully skinnable. | *This template uses CSS classes for most of its looks, thus it is fully skinnable. | ||
*Internally this meta template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | *Internally this meta template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | ||
− | *For more technical details see the CSS classes in [[MediaWiki:common.css]]. | + | *For more technical details see the CSS classes in [[MediaWiki:common.css]] and the collapsible table used to hide the box in [[MediaWiki:common.js]]. |
+ | |||
+ | === Intricacies === | ||
+ | |||
+ | *The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float: | ||
+ | ::<code>style = width:22em;float:right;margin-left:1em;margin-right:0em;</code> | ||
<includeonly> | <includeonly> |