I know that this is probably asked many times already. I just want to center all items of my navbar vertically. I tried to set vertical-align: center;
in my header
css tag.
I probably miss something:
<header>
<nav class="navbar">
<div class="branding">
<a href="index.html"> <img src="pic/branding.png" alt="branding"></a>
</div>
<div class="navbar-links">
<ul>
<li><a href="de/login.html">Login</a> </li>
</ul>
</div>
<div class="searchbox-container">
<input class="searchbar" type="text" placeholder="Search...">
<button class="search-button" type="submit"><img src="pic/searchicon.png" height="25px" width="25px" alt="search"></button>
</div>
</nav>
</header>
css:
*{
margin: 0;
padding: 0;
text-decoration: none;
list-style: none;
}
body{
font-family: sans-serif;
}
/* Navbar stuff */
header{
background-color: #424242/*#80aaff*/;
height: 60px;
}
.navbar{
width: 80%;
margin: auto;
}
.branding{
float: left;
}
.navbar-links{
float: right;
}
.navbar-links ul{
list-style: none;
}
.navbar-links ul li a{
text-decoration: none;
text-transform: uppercase;
color: white;
}