I am using a simply UL
as my navbar
, and I am trying to separate the 1 item of the UL
and put it to the left side of the page, and keep the other 3 centered, however i cant seem to get it working. I've tried wrapping it in a span and floating it, I've tried making a new UL but that just causes them to be on different lines.
I literally just want the homepage button to be aligned to the left and the rest of the buttons to be centered. Maybe I am missing something obvious.
ul {
list-style-type: none;
margin: 10px 0 0 0 ;
padding: 0;
text-align: center;
}
li {
display: inline;
padding: 0 15px;
}
a {
color: black;
text-decoration: none;
font-size: 30px;
}
<div class="navbar">
<nav>
<div>
<ul>
<li id="homepage"><a href="#">AG Designs</a></li>
<li id="aboutmebutton"><a href="#">About Me</a></li>
<li id="portfoliobutton"><a href="#">Portfolio</a></li>
<li id="contactbutton"><a href="#">Contact</a></li>
</ul>
</div>
</nav>