Seeking guidance as a novice in the realm of HTML and CSS. My issue lies in the alignment of an icon/image within a simple HTML/CSS setup. The problem at hand involves said image being positioned too high, rather than centered as intended.
I've provided my code and image for reference:
#nav {
display: inline-block;
}
#nav>li {
display: inline-block;
}
#nav li {
position: relative;
}
#nav>li>a {
color: #fff;
text-transform: uppercase;
}
#nav li a {
text-decoration: none;
line-height: 46px;
padding: 0 24px;
display: block;
}
.nav_bars-btn {
width: 28px;
height: 28px;
color: #fff;
display: inline-block;
/*display: none;*/
}
<div id="header">
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#band">Bane</a></li>
<li><a href="#tour">Tour</a></li>
<li><a href="#contact">Contact</a></li>
<li>
<a href="">More
<i class="nav-arrow-down ti-arrow-circle-down"></i>
</a>
<ul class="subnav">
<li><a href="#">Merchandise</a></li>
<li><a href="#">Extras</a></li>
<li><a href="#">Media</a></li>
</ul>
</li>
<div class="nav_bars-btn">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="bars" class="svg-inline--fa fa-bars fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>
</div>
</ul>
<div class="search-btn">
<i class="search-icon ti-search"></i>
</div>
</div>
https://i.sstatic.net/ZGmtK.jpg
https://i.sstatic.net/UdBdo.png
Upon applying padding-top: 10px;
to the .nav_bars-btn in the CSS for this button, all the "HOME," "BANE," "TOUR," "CONTACT," and "MORE" bars are pushed downward. I'm puzzled by this behavior and seek insight into why it's occurring?
Would greatly appreciate assistance in centering the button properly, along with an explanation regarding the adverse effect of using padding-top: 10px;
on the .nav_bars-btn. Thank you for your time and support.