I recently encountered an issue while designing my website. I created a div with a width of 200px on the right side of the webpage, and added a list of links within it. However, I noticed that elements inside the div are aligning slightly to the left, giving the impression of a padding-right effect even though there isn't any such property applied. I am puzzled as to where this discrepancy is coming from.
.nav-menu>ul {
margin-bottom: 1rem;
}
.nav-menu>ul>li {
text-decoration: none !important;
list-style: none !important;
outline: none !important;
border-bottom: 1px solid red;
}
.nav-menu>ul>li>a {
letter-spacing: 1px;
text-transform: uppercase;
text-align: left;
font-weight: 400;
display: block;
line-height: 45px;
color: #999;
font-size: 12px;
}
.lnr {
font-size: 20px;
padding-right: 10px;
position: relative;
top: 3px;
}
<nav class="nav-menu">
<ul>
<li><a href="#home" class="pt-link active"><span class="nav-menu-icon"><i class="lnr lnr-home"></i></span>Home </a> </li>
<li><a href="#about" class="pt-link"><span class="nav-menu-icon"><i class="lnr lnr-user"></i></span>About Me</a></li>
<li><a href="#resume" class="pt-link"><span class="nav-menu-icon"><i class="lnr lnr-license"></i></span>Resume</a></li>
<li><a href="#portfolio" class="pt-link"><span class="nav-menu-icon"><i class="lnr lnr-briefcase"></i></span>Portfolio</a></li>
<li><a href="#blog" class="pt-link"><span class="nav-menu-icon"><i class="lnr lnr-book"></i></span>Blog</a></li>
<li><a href="#contact" class="pt-link"><span class="nav-menu-icon"><i class="lnr lnr-envelope"></i></span>Contact</a></li>
</ul>
<</nav>
Thank you!