Answers for "how to make css navigation bar horizontal"

1

how to make a horizontal navigation bar in html

<style>
#nav{
	display:flex;
}
</style>

<div id='nav'>
  <div><a href='#'>Link A</a></div>
  <div><a href='#'>Link B</a></div>
  <div><a href='#'>Link C</a></div>
  <div><a href='#'>Link D</a></div>
  <div><a href='#'>Link E</a></div>
</div>
Posted by: Guest on May-26-2021
0

how to make a navigation bar in html

<!-- HTML PART -->
<a class="active" href="#home">Home</a>
<a href="news.html">News</a>
<a href="contact.html">Contact</a><a href="about.html">About</a>


<!-- CSS PART -->

.topnav a {
    float: left;
    color: goldenrod;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 20px;
  }
  
  /* Change the color of links on hover */
  .topnav a:hover {
    background-color: rgb(221, 221, 221);
    color: black;
  }
  
  /* Add a color to the active/current link */
  .topnav a.active {
    background-color: red;
    color: goldenrod;
  }
Posted by: Guest on September-04-2021

Code answers related to "how to make css navigation bar horizontal"

Browse Popular Code Answers by Language