HI CAMPERS;
(don’t know if this is the right channel to create my topic but I couldn’t find the channel for front-end help)
I am working on this page but when I add the hover background-color to the nav-list items/links, it doesn’t fill the full height/background of the link.
please help me check what I might be doing wrong.
HERE’S MY CODE:
#header{
background-color: #0a0a23;
color: #f1f1f1;
display: flex;
justify-content: left;
}
#header ul{
list-style: none;
margin-left: 250px;
}
#header li{
display: inline;
padding: 0;
}
#header a{
text-decoration: none;
color: #f1f1f1;
padding-top: 6px;
padding-right: 25px;
font-size: 20px;
float: right;
text-align: center;
}
#header a:hover{
color: #0a0a23;
background-color: #f1f1f1;
}
HTML:
<div id="header">
<input type ="text" class="search" placeholder= "Search 6,000+ tutorials">
<h1>freeCodeCamp</h1>
<div id="nav">
<ul>
<li><a href="profile">Profile</a></li>
<li><a href="curriculum">Curriculum</a></li>
<li><a href="menu">Menu</a></li>
</ul>
</div>
</div>