styling a dropdown menu using CSS


Staff member
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
opacity:0.4; filter:alpha(opacity=40);
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?


Here's my Code:

You can also check my code live here <a href="" rel="nofollow noreferrer"></a>


    &lt;ul id="menu"&gt;
            &lt;li&gt;&lt;a href=""&gt;Homepage&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=""&gt;Google&lt;/a&gt;
                &lt;ul class="sub-menu"&gt;
                    &lt;li&gt;&lt;a href=""&gt;About Us&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href=""&gt;Programs&lt;/a&gt;&lt;/li&gt;



#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 {
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;}