CSS Horizontal Navigation Bar

CategoryWed Designing
Technology HTML / CSS
Author Tutor Joes

Source Code

index.html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Menu Bar</title>
  <link rel="stylesheet" href="css/style.css">
</head>

<body>
  <nav>
    <ul>
      <li><a href="#">Products</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Downloads</a></li>
      <li><a href="#">Contact Us</a></li>
    </ul>
  </nav>
</body>

</html>
style.css
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400&display=swap');

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #2d3436;
}

nav {
  margin-top: 200px;
  text-align: center;
}

nav ul {
  display: inline-block;
  list-style: none;
  transform: skew(-25deg);
}

nav ul li {
  background-color: #fff;
  float: left;
  border-right: 1px solid #eee;
  box-shadow: 1.95px 1.95px 2.6px rgba(0, 0, 0, 1);
  text-transform: uppercase;
  color: #555;
  font-weight: 400;
  transition: all 0.2s linear;
}

nav ul li:hover {
  background-color: #0984e3;
  color: #fff;
}

a {
  color: inherit;
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  transform: skew(25deg);
}

/*  top-left  top-right   bottom-right  bottom-left */
nav ul li:first-child {
  border-radius: 7px 0 0 7px;
}

nav ul li:last-child {
  border-radius: 0 7px 7px 0;
}

Conclusion

In this article, I demonstrated how to simple navigation bar in css and html, Hope you can easily understand thank you "Happy Coding".