1

I want my logo on the left side, and About Us and Log In on the other.

I tried using floats, but the right float was pinned to the bottom of the header.

I'm also trying flexbox but things are not doing what I want.

<header>
  <a id="logo" href="#">Logo</a>
  <nav>
    <ul>
      <li><a id="aboutus" href="#">About Us</a></li>
      <li><a id="login" href="#">Log In</a></li>
    </ul>
  </nav>
</header>

Any advice on the simplest way to do this?

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Kris Jones
  • 615
  • 1
  • 5
  • 9

1 Answers1

0
<style>
ul {
list-style-type: none;
}

li {
float: right;
}

li a {
display: block;
text-align: center;
padding: 14px 16px;
}

</style>

<header>
    <a style="float:left" id="logo" href="#">Logo</a>
    <nav >
         <ul >

            <li><a id="aboutus" href="#">About Us</a></li>
            <li><a id="login" href="#">Log In</a></li>
        </ul>
    </nav>
</header>

Try this

Ziyad Godil
  • 2,620
  • 1
  • 14
  • 36