1
I wonder where I’m going wrong in my css code, because I’m trying to put a point in the title of the ordered list, example:
- Title
And also add sub-title to the same:
Title
1.1 Sub-Title
But when I go to see the test, it is not adding the point in the numbering of the Title, getting like this:
1 Title
Where the subtitle works normal.
Css code:
ol {
counter-reset: section;
list-style-type: none;
}
li::before {
counter-increment: section;
content: counters(section, ".") " ";
}
.custom-counter {
margin: 0;
padding: 0;
list-style: none;
}
.custom-counter li {
counter-increment: step-counter;
}
.custom-counter li::before {
content: counter(step-counter)'.';
margin-right: 5px;
}
HTML code:
<div class="col-sm-50" style="margin-bottom: 30px;">
<textarea required="" type="text" class="form-control" name="comentarios">
<ol class="custom-counter">
<li><b>RESUMO DE ATIVIDADES</b></li>
<li><b>COMENTÁRIOS</b></li>
</ol>
</textarea>
</div>
Remembering that, it does not have a subtitle in the above code because I am working with Ckeditor, where after I do a line break in the title inside the text editor, it automatically adds a subheading
It really worked, the problem is that when sending to the Ckeditor, it removes the point, example (1. Test for 1 Test).
– Matheus Martins
In this case I don’t have much to help. You can try to take the value of an attribute date and put in front. Type like this
content: counters(section) attr(data-ponto);
and in tag li<li data-ponto=".">
Forehead and then tell me if it worked out never tried this rss way but it might work...– hugocsl