bobmillington
asked on
How to add rounded corners to css drop-down menu?
Hello everyone...
I'm working on a website for a local nonprofit and I'm having a challenge polishing up the theme I'm working with. I'm using wordpress for the site with the hopes that it will be easier for the nonprofit to work with the site on their own once I have it completed. I'm having problems getting rounded corners around the navigation drop downs. I was able to get the top corners rounded, but I'm having a difficult time figuring out how to get the bottom corners rounded.
Here's a section of the CSS that I'm working with.
.menu a, .menu a:visited {
color: #fff;
display: block;
padding: 6px 6px 4px;
margin-right: 6px;
}
.menu-item a:hover, .current-menu-item a, .current-post-parent a, .current_page_ancestor a {
color: #fff;
-moz-border-radius: 6px;
border-radius: 6px;
background: url(images/navigation-hove r.png) repeat-x;
-webkit-box-shadow: 0px 1px 3px #C21000;
-moz-box-shadow: 0px 1px 3px #C21000;
box-shadow: 0px 1px 3px #C21000;
}
.current-menu-parent ul.sub-menu li a, .current-menu-item ul.sub-menu li a {
background-image: none;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.menu li ul {
z-index: 100;
width: 200px;
margin-left: 8px;
margin-top: 0px;
padding: 10px;
background-color: #C21000;
-webkit-box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
-moz-box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
-webkit-border-top-left-ra dius: 9px;
-moz-border-radius-topleft : 9px;
-webkit-border-top-right-r adius: 9px;
-moz-border-radius-toprigh t: 9px;
}
.menu li ul:last-child > a {
-webkit-border-bottom-left -radius: 9px;
-moz-border-radius-bottoml eft: 9px;
-webkit-border-bottom-righ t-radius: 9px;
-moz-boder-radius-bottomri ght: 9px;
}
.menu li li a, .menu li li a:visited {
color: #fff;
width: 180px;
float: none;
margin-left: 0;
margin-right: 0;
padding: 8px 9px 7px;
}
.menu li li a:hover {
color: #a0a0a0;
background: transparent;
background-image: none;
border: none;
padding: 8px 9px 7px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.menu li ul li ul {
width: 180px;
margin-top: 0px;
margin-left: 15px;
}
.menu li li li {
color: #fff;
}
/* @end */
I've bolded where I added the code that I thought would do the trick. I am using the tutorial I found here (http://webdesignerwall.com/tutorials/css3-dropdown-menu) to see if I could get it to work.
As I mentioned the top looks fine, but the bottom still isn't rounded.
Can anyone help me figure out how to get get rounded corners on the bottom of the navigation drop downs?
The site in question is at http://www.realestatefraudawareness.com. It's a domain name I wasn't doing anything with so I'm using for my test/development site.
Thank you in advance for your help with this.
I'm working on a website for a local nonprofit and I'm having a challenge polishing up the theme I'm working with. I'm using wordpress for the site with the hopes that it will be easier for the nonprofit to work with the site on their own once I have it completed. I'm having problems getting rounded corners around the navigation drop downs. I was able to get the top corners rounded, but I'm having a difficult time figuring out how to get the bottom corners rounded.
Here's a section of the CSS that I'm working with.
.menu a, .menu a:visited {
color: #fff;
display: block;
padding: 6px 6px 4px;
margin-right: 6px;
}
.menu-item a:hover, .current-menu-item a, .current-post-parent a, .current_page_ancestor a {
color: #fff;
-moz-border-radius: 6px;
border-radius: 6px;
background: url(images/navigation-hove
-webkit-box-shadow: 0px 1px 3px #C21000;
-moz-box-shadow: 0px 1px 3px #C21000;
box-shadow: 0px 1px 3px #C21000;
}
.current-menu-parent ul.sub-menu li a, .current-menu-item ul.sub-menu li a {
background-image: none;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.menu li ul {
z-index: 100;
width: 200px;
margin-left: 8px;
margin-top: 0px;
padding: 10px;
background-color: #C21000;
-webkit-box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
-moz-box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
box-shadow: inset 0px 2px 1px rgba(20,20,20,0.3);
-webkit-border-top-left-ra
-moz-border-radius-topleft
-webkit-border-top-right-r
-moz-border-radius-toprigh
}
.menu li ul:last-child > a {
-webkit-border-bottom-left
-moz-border-radius-bottoml
-webkit-border-bottom-righ
-moz-boder-radius-bottomri
}
.menu li li a, .menu li li a:visited {
color: #fff;
width: 180px;
float: none;
margin-left: 0;
margin-right: 0;
padding: 8px 9px 7px;
}
.menu li li a:hover {
color: #a0a0a0;
background: transparent;
background-image: none;
border: none;
padding: 8px 9px 7px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.menu li ul li ul {
width: 180px;
margin-top: 0px;
margin-left: 15px;
}
.menu li li li {
color: #fff;
}
/* @end */
I've bolded where I added the code that I thought would do the trick. I am using the tutorial I found here (http://webdesignerwall.com/tutorials/css3-dropdown-menu) to see if I could get it to work.
As I mentioned the top looks fine, but the bottom still isn't rounded.
Can anyone help me figure out how to get get rounded corners on the bottom of the navigation drop downs?
The site in question is at http://www.realestatefraudawareness.com. It's a domain name I wasn't doing anything with so I'm using for my test/development site.
Thank you in advance for your help with this.
ASKER
Would this mess up any other aspects of the theme? My css skill are really low. I can stumble around css that is already there, but for me to go and develop it from start to finish I'd have a heck of time. Should I attach the complete style.css to this post? The theme creator used superfish for the dropdowns. I'm sure it's a nice tool, but the drop downs look awful. I am fine adding the css you suggested if you think it would still work with the other aspects of the style sheet.
Thank you Jeremy for jumping in here and helping me out. I can't tell you how much I appreciate the direction.
Thank you Jeremy for jumping in here and helping me out. I can't tell you how much I appreciate the direction.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That may do the trick. It still seems a bit "rough". The rounded edges are there, but the crisp clean look of the other navigation bar is gone. I may be able to work with it, lengthen it again, reposition it, and work with the colors again to get it right. I think between the two I may be able to get it looking somewhat professional.
Thank you again for all of your help and time on this. I think that will probably get me close to what I need. Have a great night/day!
Thank you again for all of your help and time on this. I think that will probably get me close to what I need. Have a great night/day!
ASKER
Thank you for all of the help on this. I appreciate having people who know what they are doing willing to help out those who are struggling.
You are welcome, and thanks for the kind words.
Open in new window
Here is the source:http://webdesignerwall.com/tutorials/css3-dropdown-menu