Issue
I have a list that contains 3 items. However, it has a little margin on its left side, I want it to disappear.
Here is my code:
ul li {
display: inline;
list-style: none;
}
<ul>
<li>I have margin space on my left side</li>
<li>List 2</li>
<li>List 3</li>
</ul>
<p>
Hi! I am a text without any margin!
</p>
Solution
Just set padding of your ul
to 0. Here's a snippet:
ul {
padding: 0;
}
ul li {
display: inline;
list-style: none;
}
<ul>
<li>Hey, now I don't have extra space on my left side!</li>
<li>List 2</li>
<li>List 3</li>
</ul>
<p>Hi! I am a text without any margin!</p>
Answered By - Dmitry Gamolin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.