Cannot Get Drop Down Menu to work
-
I have taken over a website that was already up and running and from what I can tell they where using WordPress Menus. I needed to add a couple of custom menus to the main navigation which include two drop down menu items. I have them set up in menus correctly but I am thinking there has to be something that needs to be changed in the stylesheet, header.pho or functions.php. Here is what the stylesheet looks like:
body.page nav.menu-main-menu-container, body.blog nav.menu-main-menu-container, body.single nav.menu-main-menu-container {
width: 770px;
position: absolute;
top: 39px;
left: 115px;
}body.home nav.menu-main-menu-container {
width: 770px;
position: absolute;
top: 39px;
left: 180px;
}ul.menu {
height: 2.375em;
}ul.menu li {
float: left;
border-right: 1px solid #6e7692;
position: relative;
}ul.menu li ul.sub-menu {
position: absolute;
left: -999em;
}ul.menu li a {
display: block;
padding: .5625em 1em;
font-family: ‘league-gothic’;
font-weight: normal;
color: #f59213;
font-size: 1.10em;
text-shadow: 2px 2px #000;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 1px;
}ul.menu li:hover {
background: transparent url(‘images/active_bg.png’) center top no-repeat;
}Any help with this would be greatly appreciated!
Wesley
-
does the menu option not work?
The menu itself works, but the sub menus or drop downs do not. Take for instance I have a parent menu item that is EMPLOYEE LOGIN which I have designated as null or # with two custom pages under it that are not showing up. The two that are not showing up are custom menu items with links to different websites. Thanks for the response and anythings further would be a tremendous blessing
Wesley
Which theme are you using?
Starkers theme
Can you provide a link to the problematic webpage?
Try this;
.menu li:hover ul { z-index: 1; left: 0; }I will just add this to the themes function php correct?
No, amongst the theme’s styles. That’s CSS not PHP.
Oh yeah! Thanks Andrew!
Okay I placed the code but to no avail. I took over this site (someone else’s build) and there has to be something in the code that is preventing this from happening.
Whereabouts did you add it? I can’t see it in your style.css file.
I added it in the style.css in the navigation section.
It’s an issue with CSS specificity.
Use these selectors instead;ul.menu li:hover ul.sub-menuAwesome! These selectors gave me a drop down, but the background is transparent. Is there anything I can add that will give me the save look as the regular menu? Further help would be greatly appreciated. Your awesome Andrew!
Wesley
The topic ‘Cannot Get Drop Down Menu to work’ is closed to new replies.