CSS Navbar


Go to main Page

Navbar in CSS

Now we are going to create navigation bar.






Navigation bar Code



<!DOCTYPE html>
<html>
<head>
<style>
  *{
    margin:0;
    padding: 0;
  }
  body{
    font-family: sans-serif;
  }
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #010054 ;
}

li {
  float: left;
}

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

li a:hover {
  background-color: #111;
}
</style>
</head>
<body>

<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">Services</a></li>
  <li><a href="#">Contact Us</a></li>
  <li><a href="#">About Us</a></li>
</ul>

</body>
</html>