Issue
This is my code:
li.title {
list-style-type: none;
margin-left: 0;
padding-left: 0;
}
<ul>
<li class="title">Title</li>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
As you see, there is a space before "Title" text where bullet is absent. I need to remove this space, by other words to align "Title" with left side of the list. How to do it when list-style-type: none
is used?
Solution
Use list-style-position:inside
li.title {
list-style-type: none;
margin-left: 0;
padding-left: 0;
}
ul {
list-style-position: inside
}
<ul>
<li class="title">Title</li>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
Answered By - Paulie_D
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.