HTML CSS examples for CSS Widget:Menu Dropdown
Drop down menu showing after image
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul.nav {<!--from w w w . j ava2 s. co m--> list-style-type:none; margin:0; padding:0; overflow:hidden; background:Chartreuse; background:-webkit-linear-gradient(left, yellow,blue); background:linear-gradient(left, pink,OrangeRed); } li.navigation { float:left; } li.navigation a, .drop { display:inline-block; color:grey; text-align:center; padding:2rem; text-decoration:none; } li.navigation a:hover, .submenu:hover .drop, footer a:hover { background:BlueViolet; } li.submenu { display:inline-block; } .submenu-content { display:none; position:absolute; background:Chartreuse; background:-webkit-linear-gradient( yellow,blue); background:linear-gradient( pink,OrangeRed); min-width:161px; box-shadow:0px 9px 17px 0px grey; z-index:2; } li.navigation .submenu-content a { color:BlueViolet; padding:13px 17px; text-decoration:none; display:block; text-align:left; } .submenu-content a:hover { background-color:Chartreuse; } .submenu:hover .submenu-content { display:block; } </style> </head> <body> <nav> <ul class="nav"> <li class="navigation"> <a href="about.html" title="About Us">Lorem ip</a> </li> <li class="navigation"> <a href="contact.html" title="Contact Us">Lorem ipsu</a> </li> <li class="navigation submenu"> <a class="drop" href="employees.html">Lorem ips</a> <div class="submenu-content"> <a href="nora.html" title="Nora Jones">Lorem ipsu</a> <a href="carolyn.html" title="Carolyn Pennington">Lorem ipsum dolor </a> <a href="samuel.html" title="Samuel Griffiths">Lorem ipsum dolo</a> <a href="alexandra.html" title="Alexandra Smith">Lorem ipsum dol</a> </div> </li> <li class="navigation"> <a href="report.html" title="Report">Lorem </a> </li> <li class="navigation"> <a href="https://www.facebook.com/" title="Find us on Facebook!"> <img src="https://www.java2s.com/style/demo/Opera.png" alt="Find us on Facebook"> </a> </li> </ul> </nav> <br> </body> </html>