I am trying to have an unordered list with check-marks and have my text line up in the left and not have my second line of text float to the left and go under the check-marks.
Does anyone know how to make this work?
I am trying to have an unordered list with check-marks and have my text line up in the left and not have my second line of text float to the left and go under the check-marks.
Does anyone know how to make this work?
The below code helps you in understanding. Here's a JSFiddle demo.
li:before
{
content: '✔';
margin-left: -1em;
margin-right: .100em;
}
ul
{
padding-left: 20px;
text-indent: 2px;
list-style: none;
list-style-position: outside;
}
Refer this link to get the tick mark: http://amp-what.com/#q=check%20mark
Paste the code in the content property of li
to get the check mark.
I hope this will help you. Please vote.
margin-left:-1em
but how do you get the margin-right:.100em
and the text-indent:2px
on the ul
element? –
Chlorohydrin © 2022 - 2024 — McMap. All rights reserved.
li
's text, so there is no way to achieve so using preco-do element, is it okay to add aspan
for your checkmark in front of eachli
– Meltonmargin-left: -1.2em;
) to your pseudo element's selector. – React