Pure css dropdown navigation bar

Pure css dropdown navigation bar

Today we are show you how to create A Multi-Level Drop Down Menu with Pure CSS, today’s almost websites using dropdown navigation. Pure css dropdown navigation bar is a very simple and easy to use, you can use whenever you want like HTML Website, PHP Websites, ASP Websites and This is tested with WordPress also. A flat designed drop down navigation 100% built with plain HTML and CSS. You can download this using download button make it yours. don’t forget to share.

How to use Pure css dropdown navigation bar.

HTML Code of your Pure css dropdown navigation bar using nested Html lists as follows.

<div class="headernav">
  <nav>
   <ul>
     <li><a href="#">Home</a></li>
     <li><a href="#">About Us</a></li>
     <li><a href="#">Services</a></li>
     <li><a href="#">Drop Down</a>
       <ul>
         <li><a href="#">Drop Down 1</a></li>
         <li><a href="#">Drop Down 2</a></li>
         <li><a href="#">Drop Down 3</a></li>
         <li><a href="#">Drop Down 4</a></li>
       </ul>
     </li>
     <li><a href="#">Gallery</a></li>
     <li><a href="#">Contact Us</a></li>
   </ul>
  <nav>
</div>

CSS Code of your Pure css dropdown navigation bar using nested Html lists as follows.

<link href="https://fonts.googleapis.com/css?family=Merriweather:400,700" rel="stylesheet">
<style>
body{
 margin:0;
 font-family: 'Merriweather', serif;
 background: #fff; 
}
a{
 transition: 0.5s all;
 -webkit-transition: 0.5s all;
 -moz-transition: 0.5s all;
 -o-transition: 0.5s all;
 -ms-transition: 0.5s all;
 text-decoration:none;
 outline:none;
}
.headernav nav { background: #ffffff; padding:20px 0px;}
.headernav nav ul {font-size: 0; margin: 0; padding: 0;}
.headernav nav ul li {display: inline-block; position: relative;}
.headernav nav ul li a {color: #333; display: block; font-size: 16px; padding: 5px 10px; text-transform:uppercase;}
.headernav nav ul li a:hover { color: #a6ce38;}
.headernav nav ul li ul {
display: none;
position: absolute;
width: 250px;
z-index: 9;
box-shadow: 0px 1px 5px #AFAFAF;
border-radius: 5px;
padding: 6px 5px;
background: #fff;
margin-top:5px;
border: 1px solid #e6e6e6;
transition: 0.5s linear;
}
.headernav nav ul li:hover ul{display:block;}
.headernav nav ul li ul:before{
content: '';
position: absolute;
width: 0;
height: 0;
left: 30px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 12px solid #e6e6e6;
top: -13px;
}
.headernav nav ul li ul li {border-top: 1px solid #e6e6e6; display: block;}
.headernav nav ul li ul li:first-child { border-top: none; }
nav ul li ul li a {display: block; padding: 10px 14px;}
</style>
Mukesh Jakhar - PHP Web Developer
Mukesh Jakhar

This is Mukesh Jakhar. I’m a professional web developer with 3+ years experience. I am always ready for freelance work and i am writing blogs in my free time. I love to learn new technologies and share with others.

I founded PHPKIDA in September 2015. The focus of this website to provide web development tutorials of PHP, WordPress, CodeIgniter, Jquery, MySQL, HMTL, CSS etc and sharing solution to problems which i already solved.

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.