Could I easily create a vertical border in the center of my header to separate my logo/h1-text from my navbar?
I just started learning html and css last week, so forgive the messy code. I think I could clean it up a bit.
header {
height: 60px;
width: 85%;
/background-color: white;
margin: 0 auto;
/box-shadow: 0px 2px 31px -2px rgba(0, 0, 0, 0.86);
/border: 2px solid #333;
left: 0;
right: 0;
/border-sizing: border-box;
/-moz-box-sizing: border-box;
/-webkit-box-sizing: border-box;
z-index: 999999;
}
header #kage > *, header li {
display: inline-block;
}
header li {
padding: 0 8px 0 8px;
float:left;
}
#kage {
width: 99%;
margin: 0 auto;
height: 100%;
line-height: 59px;
text-align: center;
}
.button1:hover {
background-color: #f2f2f2;
}
.button2:hover {
background-color: #f2f2f2;
}
... (more CSS)
<header>
<div id="kage">
<a href="index.html"><h1>H1 TEXT HEREEEEE</h1></a>
<nav id="topnav">
<ul class="menu">
<a href="index.html"><li class="button1 active">Home</li></a>
<a href="profil.html"><li class="button2">About</li></a>
<a href="mdu.html"><li class="button3">MDU</li></a>
</ul>
</nav>
</div>
</header>
It looks like running the snippet in full screen is necessary to ensure the header doesn't break into two lines.