I have been trying to design a dropdown menu like following for my wordpress theme using CSS.
<img src=" " alt="enter image description here">
I have manged to create the dropdown but I cannot figure out how to create the curve using CSS and make the background color look transparent like in the image above.
To make it look transparent I tried
but it doesn't look near the dropdown menu above.
Could you please tell me how to make my dropdown look like the one in the image and make it responsive too?
Thanks
Here's my Code:
You can also check my code live here <a href="http://jsfiddle.net/MdpPd/" rel="nofollow noreferrer">http://jsfiddle.net/MdpPd/</a>
HTML
CSS
<img src=" " alt="enter image description here">
I have manged to create the dropdown but I cannot figure out how to create the curve using CSS and make the background color look transparent like in the image above.
To make it look transparent I tried
Code:
opacity:0.4; filter:alpha(opacity=40);
Could you please tell me how to make my dropdown look like the one in the image and make it responsive too?
Thanks
Here's my Code:
You can also check my code live here <a href="http://jsfiddle.net/MdpPd/" rel="nofollow noreferrer">http://jsfiddle.net/MdpPd/</a>
HTML
Code:
<nav>
<ul id="menu">
<li><a href="">Homepage</a></li>
<li><a href="">Google</a>
<ul class="sub-menu">
<li><a href="">About Us</a></li>
<li><a href="">Programs</a></li>
</ul>
</li>
</ul>
</nav>
CSS
Code:
#menu {
display: block;
float: left;
margin: 0 auto 0;
width: 100%;
}
#menu ul {
list-style: none;
margin: 0;
padding-left: 0;
position: absolute;
background: #108BB6;
}
#menu li {
float: left;
position: relative;
list-style-type: none;
}
#menu a {
display: block;
line-height: 2.4em;
padding: 0 13px;
text-decoration: none;
}
#menu ul li {
display:block;
clear: both;
width: 265px;
}
#menu ul li:hover {
display: inline-block;
}
#menu li:not(:hover) ul {
display: none;
}
#menu ul ul {
box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
display: none;
float: left;
position: absolute;
top: 2em;
left: 0;
z-index: 99999;
}
#menu ul ul ul {
left: 100%;
top: 0;
}
#menu ul ul a {
background: #dedede;
line-height: 1em;
padding: .5em .5em .5em 1em;
width: 10em;
height: auto;
}
#menu a:link {color:black;}
#menu a:visited {color:black;}
#menu a:focus {color:black; background: #ebdb00;}
#menu a:hover {color:white; background: #0C6481;}
#menu a:active {color:black; background: #ebdb00;}