Skip to content

Commit

Permalink
Merge pull request #1105 from Aashi19234/new
Browse files Browse the repository at this point in the history
Added drop-down menu on services section
  • Loading branch information
sunny0625 authored Jun 21, 2024
2 parents be3e300 + d370c92 commit 0768a29
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@
<a class="nav-link" href="Html-files/menu.html">Menu</a>
</li>
<li class="nav-item">
<!--Drop-down-->
<a class="nav-link" href="Html-files/services.html">Services</a>
<ul class="dropdown">
<li><a href="#">Ordering options</a></li>
<li><a href="#">Order Tracking</a></li>
<li><a href="#">Customer Support</a></li>
<li><a href="#">FAQS</a></li>

</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="Html-files/contact.html">Contact Us</a>
Expand Down
43 changes: 42 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -718,4 +718,45 @@ body{

.summery:hover {
cursor: pointer;
}
}

/*Drop down*/
ul li ul.dropdown {
width: auto;
background: #000; /* Black background */
position: absolute;
z-index: 999;
display: none;
padding: 10px 0;
border-radius: 4px; /* Rounded corners */
}

/* Show dropdown menu on hover */
.nav-link:focus {
outline: none;
}
ul li:hover ul.dropdown {
display: block;
}

/* Dropdown menu item styling */
ul li ul.dropdown li {
display: block;
background: #000; /* Black background */
margin: 2px 0;
}

ul li ul.dropdown li a {
display: block;
padding: 10px 20px;
text-decoration: none;
color: #fff; /* White font color */
white-space: nowrap; /* Prevent text wrapping */
}

ul li ul.dropdown li a:hover {
background: #ff0000; /* Red background on hover */
color: #fff; /* Ensure font color remains white */
}

/* Optional: styling for active links */

0 comments on commit 0768a29

Please sign in to comment.