Fiddle: http://jsfiddle.net/pgf0ckfj/1/
CSS:
ul {
list-style: none;
padding: 0 0 0 45px;
}
ul li:before {
content: "♦ ";
color: #E55302;
}
As you can see the text is not indented like the normal UL
.
How can I modify the CSS to ensure the text is indented for anything overflowing to the next line.
Add
text-indent
attribute.Set the
li
toposition: relative;
and then your pseudo element toposition: absolute;
along with a negativeleft
value. Adding relative positioning will make sure that your absolute positioned pseudo element will position itself based on the location and size of theli
.