Last active
February 5, 2018 08:06
-
-
Save DanWebb/0ad321966ae582c74256 to your computer and use it in GitHub Desktop.
Style ol and ul numbers or bullets separately
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul { | |
list-style: none; | |
padding-left: 1.1225em; | |
} | |
ul li { | |
position: relative; | |
padding-bottom: 3px; | |
} | |
ul li::before { | |
content: "\2022"; | |
color: green; | |
position: absolute; | |
left: -1.1225em; | |
padding-right: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul, ol { | |
list-style: none; | |
padding-left: 1.1225em; | |
} | |
ol { | |
counter-reset: li; | |
position: relative; | |
} | |
ul li { | |
position: relative; | |
padding-bottom: 3px; | |
} | |
ul li::before, | |
ol li:before { | |
content: "\2022"; | |
color: blue; | |
position: absolute; | |
left: -1.1225em; | |
padding-right: 0; | |
} | |
ol li:before { | |
content: counter(li)'.'; | |
counter-increment: li; | |
left: -0.1225em; | |
font-weight: bold; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul, ol { list-style: none; margin: 0; padding: 0; color: green; } | |
ol { counter-reset: li; } | |
ul li:before, ol li:before { padding-right: 5px; color: red; } | |
/* Swap out the bullets/numbers for custom text */ | |
ul li:before { content: "\2022 "; } | |
ol li:before { content: counter(li)'.'; counter-increment: li; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment