Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
Um Aufzählungszeichen im Seitentext fortlaufend zu nummerieren, können Sie folgendes CSS zur Seite MediaWiki:Common.css hinzufügen.<syntaxhighlight lang="css"> | Um Aufzählungszeichen im Seitentext fortlaufend zu nummerieren, können Sie folgendes CSS zur Seite ''MediaWiki:Common.css'' hinzufügen. Bitte beachten Sie, dass diese Sonderformatierung eventuell nicht genutzt werden kann, wenn Sie mit CSS-Deklarationen aus anderen Stylesheets im Wiki nicht vereinbar ist. | ||
Diese Formatierung wird nicht im PDF-Export berücksichtigt.<syntaxhighlight lang="css"> | |||
/* Styles for formatting sub-ordered-list-items with 1.1., 1.1.1., etc.)*/ | /* Styles for formatting sub-ordered-list-items with 1.1., 1.1.1., etc.)*/ | ||
/* First, set all numbered lists to use counter-reset */ | /* First, set all numbered lists to use counter-reset */ | ||
#mw-content-text ol { | #mw-content-text ol, ol.ve-ce-branchNode { | ||
counter-reset: item; | counter-reset: item; | ||
margin: 0.3em 0 0 2.2em; | margin: 0.3em 0 0 2.2em; | ||
Zeile 9: | Zeile 11: | ||
/* Display all list items in a numbered list in block display */ | /* Display all list items in a numbered list in block display */ | ||
#mw-content-text ol>li { | #mw-content-text ol>li, ol.ve-ce-branchNode>li { | ||
display: block; | display: block; | ||
} | } | ||
ol.ve-ce-branchNode>li > p {display:inline} | |||
/* Use a counter that checks the number of items and adds a "." between them and ends with ". " */ | /* Use a counter that checks the number of items and adds a "." between them and ends with ". " */ | ||
#mw-content-text ol>li:before { | #mw-content-text ol>li:before, ol.ve-ce-branchNode>li:before { | ||
content: counters(item, ".") ". "; | content: counters(item, ".") ". "; | ||
counter-increment: item; | counter-increment: item; | ||
Zeile 29: | Zeile 32: | ||
# Schritt 2 | # Schritt 2 | ||
# Schritt 2 | # Schritt 2 | ||
Aufzählungslisten, die nicht nummeriert sind, sind nicht von der CSS-Anweisung betroffen: | |||
* Listenpunkt 1 | * Listenpunkt 1 | ||
** Listenpunkt 2 | ** Listenpunkt 2 | ||
*** Listenpunkt 3 | *** Listenpunkt 3 | ||
[[Kategorie:Anpassung]] | [[Kategorie:Anpassung]] | ||
[[de:{{FULLPAGENAME}}]] | [[de:{{FULLPAGENAME}}]] | ||
[[en:Numbering ordered lists]] | [[en:Numbering ordered lists]] |
Version vom 17. Juli 2024, 13:02 Uhr
Um Aufzählungszeichen im Seitentext fortlaufend zu nummerieren, können Sie folgendes CSS zur Seite MediaWiki:Common.css hinzufügen. Bitte beachten Sie, dass diese Sonderformatierung eventuell nicht genutzt werden kann, wenn Sie mit CSS-Deklarationen aus anderen Stylesheets im Wiki nicht vereinbar ist.
Diese Formatierung wird nicht im PDF-Export berücksichtigt.
/* Styles for formatting sub-ordered-list-items with 1.1., 1.1.1., etc.)*/
/* First, set all numbered lists to use counter-reset */
#mw-content-text ol, ol.ve-ce-branchNode {
counter-reset: item;
margin: 0.3em 0 0 2.2em;
}
/* Display all list items in a numbered list in block display */
#mw-content-text ol>li, ol.ve-ce-branchNode>li {
display: block;
}
ol.ve-ce-branchNode>li > p {display:inline}
/* Use a counter that checks the number of items and adds a "." between them and ends with ". " */
#mw-content-text ol>li:before, ol.ve-ce-branchNode>li:before {
content: counters(item, ".") ". ";
counter-increment: item;
}
Ausgabe:
- Schritt 1
- Unterschritt 1
- Unterschritt 2
- Unterunterschritt 1
- Unterunterschritt 2
- Unterunterschritt 3
- Schritt 2
- Schritt 2
- Schritt 2
Aufzählungslisten, die nicht nummeriert sind, sind nicht von der CSS-Anweisung betroffen:
- Listenpunkt 1
- Listenpunkt 2
- Listenpunkt 3
- Listenpunkt 2