menu
Mon May 01 2023 18:21:38 GMT+0000 (Coordinated Universal Time)
Saved by @prachi
<!DOCTYPE html>
<html>
<head>
<title>Navigation Bar Example</title>
<style>
/* Style for the navigation bar */
.navbar {
background-color: #333;
overflow: hidden;
}
/* Style for the navigation bar links */
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Style for the dropdown menu */
.dropdown {
float: left;
overflow: hidden;
}
/* Style for the dropdown menu button */
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
margin: 0;
}
/* Style for the dropdown menu content */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
z-index: 1;
}
/* Style for the dropdown menu links */
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
/* Style for the hover effect on dropdown menu links */
.dropdown-content a:hover {
background-color: #ddd;
}
/* Show the dropdown menu when the user hovers over it */
.dropdown:hover .dropdown-content {
display: block;
}
</style>
</head>
<body>
<div class="navbar">
<div class="dropdown">
<button class="dropbtn">Home
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Service 1</a>
<a href="#">Service 2</a>
<a href="#">Service 3</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Services
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Service 1</a>
<a href="#">Service 2</a>
<a href="#">Service 3</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">About Us
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Service 1</a>
<a href="#">Service 2</a>
<a href="#">Service 3</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Contact Us
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Service 1</a>
<a href="#">Service 2</a>
<a href="#">Service 3</a>
</div>
</div>
</div>
</body>
</html>



Comments