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.
On the ul add display: flex;
ul
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>