I have a list that at some screen-size breaks into multiple lines
The issue is that in this case I want my list bullet to align vertically in the middle of the text shown.
So practically if I have 3 lines inside the same list element, I want the bullet/market to show up next to the second line instead of the first, and if I have 2 lines, the dot should line itself between the two lines.
I tried vertical-align so far, no success and couldn’t find an appropriate idea for my question yet.
3
Answers
I have an
ul
list here in this snippet and I have used a::before
pseudo-class on theli
element and as you can see the dots are vertically aligned with the text. I hope this is what you wanted to achieve.The standard bullet does not allow for adjustment in this manner.
It is necessary to create a pseudo-element for the marker and then align it using. say, flexbox.
Here is an idea using
border-image
to replace the default marker