-5

I have used the < div > tag to create a navigation menu bar but it only displays in a vertical fashion. However, I then changed the < div > tag into a < nav > tag, but still receive the same results in a vertical orientation.

enter image description here

enter image description here

enter image description here

1 Answers1

0

On the ul add display: flex;

nav {
  padding: 0;
  width: 100%;
  background: #262626;
  overflow: hidden;

}
li a {
  color: white !important;
  text-align: center;
  padding: 16px;
  text-decoration: none;
}
li a:hover {
  background-color: gray;
}
li {
  list-style: none;
}
ul {
  display: flex;
}
<nav>
  <ul>
    <li><a href="#">HOME</a></li>
    <li><a href="#">SERVICES</a></li>
    <li><a href="#">ABOUT US</a></li>
    <li><a href="#">CONTACT</a></li>
    <li><a href="#">NEWS</a></li>
    <li><a href="#">FAQ</a></li>
  </ul>
</nav>
Kai K
  • 80
  • 4