I am practicing html/css by making this website but there are some white spaces to the left and right around the links in list of contents. I have added a sample of html code of how complete list is coded.
I have tried setting the margins and paddings of all elements to zero but nothing is working.
body {
margin: 0;
}
.container {
display: grid;
grid-template-columns: 20% 80%;
margin: 0;
}
.nav_bar {
min-height: 100vh;
overflow-y: auto;
margin: 0;
padding: 0;
}
.nav_bar ul {
display: block;
padding: 5px;
list-style: none;
font-size: 0;
margin: 0;
}
.nav_bar li {
padding: 10px 5px;
border-bottom: 2px solid black;
}
<div class="container">
<div class="nav_bar">
<h3>JS DOCUMENTATION</h3>
<ul class="nav_list">
<li>
<a href="page.html#introduction">Introduction</a>
</li>
</ul>
</div>
</div>