Reputation: 880
I asked a related question a few minutes ago through which I got this updated code but I can't figure out how to get my logo to show up on the left hand side.
HTML:
<header>
<img src="/images/logo.png" height="50px" id="front" />
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li class="last"><a href="#">Contact</a></li>
</ul>
</nav>
<div id="second_line"></div>
</header>
CSS:
body {
margin: 0;
}
header {
background-color: #009000;
height: 85px;
position: relative;
}
#front {
margin-left: 20px;
margin-top: 20px;
}
nav {
float: left;
margin-top: 30px;
}
ul {
margin: 0;
padding: 0;
float: left;
}
ul li {
list-style-type: none;
float: left;
border-right: 2px solid black;
padding-right: 5px;
padding-left: 5px;
}
ul li.last {
border-right: 0px;
}
#second_line {
margin-top:10px;
height:3px;
background-color: #FECE2C;
}
How do I fix this so that the logo is on the left not the right?
Thanks!
Upvotes: 0
Views: 63
Reputation: 123423
You might try adjusting the <nav>
to inline-block
:
nav {
display: inline-block;
}
Upvotes: 1