Edytujesz
Szablon:Navbox/doc
(sekcja)
Przejdź do nawigacji
Przejdź do wyszukiwania
Uwaga:
Nie jesteś zalogowany. Jeśli wykonasz jakąkolwiek zmianę, Twój adres IP będzie widoczny publicznie. Jeśli
zalogujesz się
lub
utworzysz konto
, Twoje zmiany zostaną przypisane do konta, wraz z innymi korzyściami.
Filtr antyspamowy.
Nie
wpisuj tu nic!
=== 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 [[Module:Navbox/styles.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>.
Opis zmian:
Wkład na Mcseriopedia jest udostępniany na licencji Creative Commons – za podaniem autora (szczegóły w
Mcseriopedia:Prawa autorskie
). Jeśli nie chcesz, żeby Twój tekst był dowolnie zmieniany przez każdego i rozpowszechniany bez ograniczeń, nie umieszczaj go tutaj.
Zapisując swoją edycję, oświadczasz, że ten tekst jest Twoim dziełem lub pochodzi z materiałów dostępnych na warunkach
domeny publicznej
, lub kompatybilnych.
PROSIMY NIE WPROWADZAĆ MATERIAŁÓW CHRONIONYCH PRAWEM AUTORSKIM BEZ POZWOLENIA WŁAŚCICIELA!
Anuluj
Pomoc w edycji
(otwiera się w nowym oknie)
Menu nawigacyjne
Narzędzia osobiste
Nie jesteś zalogowany
Dyskusja
Tryb ciemny
Edycje
Utwórz konto
Zaloguj się
Przestrzenie nazw
Szablon
Dyskusja
polski
Widok
Czytaj
Edytuj kod źródłowy
Wyświetl historię
Więcej
Szukaj
Nawigacja
Strona główna
Ostatnie zmiany
Losowa strona
Pomoc z MediaWiki
Pomoc z edytowaniem
Główne katalogi
Drzewo kategorii
Oś czasu
Księga ksiąg
Wszystkie strony
Narzędzia
Linkujące
Zmiany w linkowanych
Strony specjalne
Informacje o tej stronie