I’m trying to style the Bullets and Numbers of Lists in a Rich Text Element. I found some code on CodePen that I can get to work in their editor and found my Webflow CSS indicator for the section, but part of the code comes up as an error in the Webflow page Custom Code Section.
CodePen Example I’m using: https://codepen.io/Cr0up13r/pen/VeeaMR
And below for easy reference:
HTML Example
<h1>Favorite Web-Frameworks:</h1>
<ul class="numbered-list">
<li>AngularJS</li>
<li>Yii</li>
<li>Symfony</li>
<li>Ruby on Rails</li>
<li>Laravel</li>
</ul>
CSS Example
ul.numbered-list {
counter-reset: li;
list-style-type: none;
font-size: 14px;
line-height: 18px;
padding-left: 10px;
li {
position: relative;
padding: 5px 0 5px 30px;
&:before {
content: counter(li);
counter-increment: li;
height: 20px;
width: 20px;
border: 1px solid blue;
border-radius: 50%;
color: red;
text-align: center;
position: absolute;
left: 0;
top: 4px;
}
}
}
In Webflow, I’ve added the code to the Head Section of the Custom Code, like this:
<style>
.w-richtext ol {
counter-reset: li;
list-style-type: none;
font-size: 19px;
line-height: 27px;
padding-left: 10px;
li {
position: relative;
padding: 5px 0 5px 30px;
&:before {
content: counter(li);
counter-increment: li;
height: 27px;
width: 27px;
background: #111111;
border-radius: 50%;
color: white;
text-align: center;
position: absolute;
left: 0;
top: 4px;
margin: 0 0 0 0;
}
}
}
</style>
But the ‘li’ element is giving me this highlighted error:
How can if fix that li error to get this to work?
Here is my site Read-Only: Webflow - Ostendo.Design