css dropdown menu doesn't stay visible - css

CSS Dropdown menu does not stay visible on mouseover. I tried searching the answers but no codes work thus far. Here is the url: http://delawaresign.com.previewc40.carrierzone.com/about.html
but here's the clincher. It works FINE on another URL i made with the same flipping code!
http://delawaresign.com.previewc40.carrierzone.com/index-01-14-13.html
I can't figures this out! Why will it work on one but not the other??
It "shows" visible, but doesn't "stay" visible.

The problem is that you have a space between the menu item and drop down list. Put the drop down in other color and you will see the space.
The easiest solution to this is to remove this space putting the list up. Try to change the top: 2.5em to top: 1.5em in .sf-menu li:hover ul which is inside superfish.css file:
.sf-menu li:hover ul, .sf-menu li.sfHover ul {
left: 0;
top: 1.5em;
z-index: 99;
}

Related

Menu link areas not aligned with text [wordpress]

After playing around with my header and and main menu it seems the link box is not actually aligned with the text. I tried playing around with margins and padding but I can't seem to get it to work or find the right class. I would like to keep everything where it is currently and just move the link areas to the right so everything aligns. Any input is appreciated.
Website: http://museiam.ca/
This is happening because you have:
.main-navigation ul li a, .menu_centered_style .gbtr_first_menu li
{
left: 40px;
}
Removing the left: 40px; should fix this.
EDIT: Try adding the following styles
.menu_centered_style .gbtr_first_menu ul
{
margin-left: 108px;
}
.menu_centered_style .gbtr_first_menu .shopping_bag_centered_style_wrapper
{
margin-left: -24px;
}

Second menu level hides third one although z-index is lower

Regarding my navigation I have the problem that the second level is covered by the video or other elements that are created by javascript (visible when you hover "Hier lebe ich" or "Am Meer"):
http://www.ulrichbangert.de/orchid/mediaelement/2013-03-25_Pleione_Ueli_Wackernagel_Pearl.php
No problem, I thought, and gave the second level a higher z-index but lower than that one of the third level. But now the second level hides the third one partly although it's z-index is lower:
http://www.ulrichbangert.de/orchid/mediaelement/2013-03-25_Pleione_Ueli_Wackernagel_Pearl_zindex.php
(Hover the menu items below "Blumen und Pflanzen" and open the third level.)
CSS:
ul#Navigation li ul {
z-index: 998;
ul#Navigation li ul li {
z-index: 998;
ul#Navigation li ul li ul {
z-index: 999;
What is the reason for this and how can I fix it?
Best regards - Ulrich
remove z-index from ul#Navigation li ul li and the problem goes away

CSS Dropdown Disappears When Focus From Parent <li> is lost

I've read replies for similar problems to mine, and I believe I've tried the steps mentioned but I'm still having problems with my dropdown menu disappearing when mouse off.
I've removed the formatting of the dropdown just so the code is bare bones, please take a look:
http://freerange.wesleypearce.co.uk
If you mouse over past productions you'll see my problem.
Thanks in advance for what probably is quite a simple fix, it's just alluding me!
Cheers,
Wes.
In the rule for your dropdown uls, use padding-top: <#>px; rather than top: 45px; to put spacing between the menu header and your list. The top value should be no more than the height of the menu header, otherwise you'll create a gap between it and the list, which will remove the list's visibility as soon as the cursor moves off the header and over the gap.
Try this one on style.css line 89
I have changed the top position of ul. The problem is there is a gap between your a tag (Past Products) and dropdown ul
#menu ul ul {
margin: 0 auto;
position: absolute;
top: 40px;
visibility: hidden;
width: 90px;
}
You're pushing your submenu too far from your main menu item, just declare it 100% to push your submenu exactly below your main menu item to fix the problem:
#menu ul ul {
top: 100%; /* fix */
}

Horizontal Nested LI Menu

I'm trying to design a horizontal menu just using CSS
Please refer to the following
http://jsfiddle.net/aUYca/
The CSS Classes are
li.navMenuParent: A Top Level Menu Item
li.navMenuActiveParent: A Top Level ACTIVE menu item
li.navMenuNode: A Top Level Menu Item that doens't have child items
li.Active: A Child level ACTIVE menu item
I want the menu to always display the child level menu when the parent has a navMenuActiveParent element. (The intial state hover over 2Parent)
.navmenu ul li.navMenuActiveParent > ul
{
display: inline;
left: 0;
margin: 0;
padding: 0;
position: absolute;
width: 100%;
}
However i want that submenu hidden when the user hovers over a top level menu item WITHOUT children. (Hover over the HOME menu item)
.navmenu li.navMenuParent ul
{
display: none; -- I want this applied to ALL <ul> under .navMenu
}
I want the Submenu to show the correct submenu when the user hovers over a top level menu item WITH children. (Hover over 1Parent)
.navmenu li.navMenuParent:hover ul, .navmenu li.navMenuParent.hover ul
{
position: absolute;
display: inline;
left: 0;
width: 100%;
margin: 0;
padding: 0;
}
I can't seem to get this to work with pure CSS.
Thanks for any help!
The trick is to apply the right effects to the right elements with as little markup as possible.
http://jsfiddle.net/EGNKE/74/
Mind you I didn't reset most of the stuff because jsFiddle does that for you and I would reccommend a reset css file by default too if you're not like, a god, at css.
It only dies in quirks mode in IE, but it's easy to prevent people from viewing your website in quirks mode by keeping to the standards and/or using X-UA-Compatible header (google it).
I trust you can figure the rest out yourself, else let me know :)
(oh btw you better be using a shorttag for that background arrow in a menu item background: color url('path.jpg') posx posy repeat;)

how to stop centered css dropdown menu from twitching (chrome only)

I have a css driven dropdown menu, and in Chrome when I hover over the last option the whole thing jumps to the left slightly. I assume it's because the dropdown menu is adding to the overall width of the main list even though it's styled to float. Is there any way to fix this? (it's not doing it in firefox interestingly)
I've noticed by using webdeveloper to outline elements that the last li appears to get wider when it's hovered, but none of the others do.
the applicable sourcecode is here:
http://jsfiddle.net/WsAEW/
It worked for me changing this:
#menu ul li {
display: inline;
position: relative;
}
to this:
#menu ul li {
display: inline-block;
position: relative;
}
Here is a modified jsfiddle. I think the issue is fixed. Give it a try.
http://jsfiddle.net/WsAEW/5/
BTW, I only changed the following style. The 'float left' gets the elements to line up horizontally and the 'display: block' gets the top element to size to include the drop down menu.
#menu ul li {
float: left;
display: block;
position: relative;
}

Resources