0

I am trying to achieve this style in my <ul>:

Picture - 1

I have used the list-style-image in CSS, but, I a being able to align the text after image. How can I do that? Here is the picture of the current output:

picture - 2

Here is my code:

#engineering-features {
  li {
    list-style-image: url(../img/engineering/li.png);
    font-size: 1.2rem;
  }
}

There is a similar question in Stack Overflow, the most upvoted solution in that question didn't solve my issue.

halfer
  • 18,701
  • 13
  • 79
  • 158

1 Answers1

1

Use some padding and line-height: Change my values as what suits your layout.

li {
    list-style-image: url(../img/engineering/li.png);
    font-size: 1.2rem;
    padding-left: 30px;
    line-height: 31px;
  }
Jawad
  • 148
  • 8
  • Allmost solved my issue. Still the text is a bit below the image. Is there anything I can do to move the text a bit up? – raymond-redd Aug 11 '20 at 15:58
  • thanks man if it works then accept my answer, for text a bit up try to adjust the line-height. or check if there is any other margin is affecting the result. margin: 0; – Jawad Aug 11 '20 at 16:30