CSS/Less Only Dropdown Menu
How do I make an css/less only dropdown menu?
This uses only css to style a dropdown menu with 3 levels. It would be easy to add your own mobile responsive style to this. I'm using Less here for the css.. What is a css/less only dropdown menu? How do you make a css/less only dropdown menu? This script and codes were developed by Daniel Murphy on 16 September 2022, Friday.
CSS/Less Only Dropdown Menu - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS/Less Only Dropdown Menu </title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="menu-main-container"> <ul> <li class="menu-item-has-children"><a href="">Brands</a> <ul> <li><a href="">Bulwark</a></li> <li><a href="">Carhartt</a></li> <li><a href="">DriFire</a></li> <li><a href="">Rasco</a></li> <li><a href="">Tyndale</a></li> <li><a href="">Workrite</a></li> <li><a href="">Wrangler</a></li> </ul> </li> <li class="menu-item-has-children"><a href="">Men</a> <ul> <li><a href="">Coveralls</a></li> <li><a href="">Pants</a></li> <li><a href="">Shirts</a></li> <li class="menu-item-has-children"><a href="">Outerwear</a> <ul> <li><a href="">Coats</a></li> <li><a href="">Lab Coats</a></li> <li><a href="">Vests</a></li> </ul> </li> </ul> </li> <li class="menu-item-has-children"><a href="">Women</a> <ul> <li><a href="">Coveralls</a></li> <li><a href="">Pants</a></li> <li class="menu-item-has-children"><a href="">Outerwear</a> <ul> <li><a href="">Coats</a></li> <li><a href="">Jackets</a></li> <li><a href="">Vests</a></li> </ul> </li> </ul> </li> <li><a href="">Head Cover</a></li> <li><a href="">Gloves</a></li> </ul>
</div>
</body>
</html>
CSS/Less Only Dropdown Menu - Script Codes CSS Codes
.menu-main-container ul { list-style: none; padding: 0; margin: 0;
}
.menu-main-container ul li { padding: 4px 8px; background: #eee; margin: 1px 1px;
}
.menu-main-container ul li:hover { background: #DBDBDB; transition: .3s;
}
.menu-main-container ul li a { text-decoration: none;
}
.menu-main-container > ul > li { float: left;
}
.menu-main-container > ul > li > a { font-size: 20px; text-transform: uppercase;
}
.menu-main-container > ul > li > ul { position: absolute; opacity: 0; visibility: hidden;
}
.menu-main-container > ul > li > ul li { float: left;
}
.menu-main-container > ul > li > ul li.menu-item-has-children > a:after { content: " >";
}
.menu-main-container > ul > li > ul ul { opacity: 0; position: absolute; visibility: hidden;
}
.menu-main-container > ul > li > ul li:hover > ul { opacity: 1; transition: .5s; visibility: visible;
}
.menu-main-container > ul > li:hover > ul { opacity: 1; transition: .5s; visibility: visible;
}
Developer | Daniel Murphy |
Username | dsm |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 2,409 Kb |
Views | 24,288 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Testing Buttons | 2,447 Kb |
Super simple snow | 2,464 Kb |
Flexbanner Center of a Center | 2,348 Kb |
Speed Reader | 3,032 Kb |
US MAP SVG With Hover | 41,717 Kb |
A Pen by Daniel Murphy | 1,745 Kb |
For Freddy | 1,682 Kb |
College Counselor Finder with SVG Maps | 25,987 Kb |
Adaptive Quiz | 2,601 Kb |
Greenstock GSAP Test | 5,401 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Two Element Typeface | Chrisota | 4,942 Kb |
A Pen by Anoop | Anoopjohn | 330,760 Kb |
Highbrow Basic HTML Lesson 7 | Kimlarocca | 1,662 Kb |
Halo 5 REQ Guide Bookmarklet | Cwacht | 3,993 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
ASCII triangle image overlay | Mitchdot | 2,200 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Rainbow Drops | Csbarnes | 2,365 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!