Redigerer
Mal:Navbox/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
=== 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. Examples: ::: <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. 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 [[#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. 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 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. 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]]. <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>.
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Denne siden er medlem av 1 skjult kategori:
Kategori:Sider hvor ekspansjonsdybden er overskredet
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon