I'm running into some issues with trying to get a header bar working. The idea is that all elements need to be on the same line: the four to the left, and 3 links to the right.
However, even with using display: inline-block
, I can't seem to get the list items to actually stay on the one line. Any ideas? (Currently using red background to highlight them for debugging)
html {
font-family: sans-serif;
font-size: 14px;
font-weight: normal;
line-height: 3.41;
}
body {
background-color: #111;
margin: 0;
padding: 0;
}
*,
*:before,
*:after {
box-sizing: border-box;
}
h1 {
margin: 0;
}
.navi li {
list-style: none;
}
.navi a {
text-decoration: none;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 0 2em 0 2em;
font-size: 18px;
font-weight: 500;
color: white;
}
.navi-left {
display: inline-block;
margin-right: 10px;
width: 200px;
background-color: red;
}
.navi-right {
display: inline-block;
margin-right: 10px;
width: 200px;
background-color: red;
}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <nav class="header-navi"> -->
<nav class="navi">
<ul class="navi navi-left">
<li><a href="work.html">Wip</a></li>
<li><a href="about.html">About</a></li>
<li><a href="coursework.html">Coursework</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<ul class="navi navi-right">
<li><a href="https://www.dribbble.com" target="blank">Dribbble</a></li>
<li><a href="https://www.twitter.com" target="blank">Twitter</a></li>
<li><a href="https://www.Github.com" target="blank">Github</a></li>
</ul>
</nav>
</header>