No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
To create numbering as 1., 1.1, 1.1.1 and so on, use the following style:<syntaxhighlight lang="text"> | To create numbering as 1., 1.1, 1.1.1 and so on, use the following style:<syntaxhighlight lang="text"> | ||
/*Numbered lists*/ | /*Numbered and unordered lists*/ | ||
#mw-content-text ol ::marker { | |||
content: counters(list-item,'.')". "; | |||
} | |||
#mw-content-text ol li::before { | |||
content:"\00a0\00a0" | |||
} | |||
#mw-content-text ol { | |||
margin-left:1.4em; | |||
} | |||
#mw-content-text ol ol { | |||
margin-left:2.6em; | |||
} | |||
/*Number footnotes separately */ | /*Number footnotes separately */ | ||
#mw-content-text .references ::marker { | |||
content: " "; | |||
} | |||
#mw-content-text ol.references { | |||
counter-reset:ref; list-style-type:none; | |||
} | |||
#mw-content-text ol.references li:before{ | |||
counter-increment:ref; | counter-increment:ref; | ||
content:counter(ref) ". "; | content:counter(ref) ". "; | ||
float: left; | float: left; | ||
margin-right: | margin-right: 1em; | ||
} | } | ||
#mw-content-text ol > li li { | |||
margin-left:-0.3em; | |||
} | |||
</syntaxhighlight>Output: | </syntaxhighlight>Output: | ||
Revision as of 15:52, 12 June 2023
To create numbering as 1., 1.1, 1.1.1 and so on, use the following style:
/*Numbered and unordered lists*/
#mw-content-text ol ::marker {
content: counters(list-item,'.')". ";
}
#mw-content-text ol li::before {
content:"\00a0\00a0"
}
#mw-content-text ol {
margin-left:1.4em;
}
#mw-content-text ol ol {
margin-left:2.6em;
}
/*Number footnotes separately */
#mw-content-text .references ::marker {
content: " ";
}
#mw-content-text ol.references {
counter-reset:ref; list-style-type:none;
}
#mw-content-text ol.references li:before{
counter-increment:ref;
content:counter(ref) ". ";
float: left;
margin-right: 1em;
}
#mw-content-text ol > li li {
margin-left:-0.3em;
}
Output:
- Step 1
- Substep 1
- Substep 2
- Subsubstep 1
- Step 2