CSS Drop Down Menu Disappears

user3444824 Source

So I have a drop down menu which works just fine as is, however when I attempt to change the font size found under:

#mbtnav li li a, #mbtnav li li a:link, #mbtnav li li a:visited {
background: #897768;
/* width: 140px; */
color: #FFF; 
display: block; 
font:bold 13px Futura, Impact, Helvetica, Arial, sans-serif; 
margin: 0; 
padding: 9px 12px 10px 12px; 
text-decoration: none; 
z-index:9999; 
border-bottom:0px; 
}  

from 15px to anything larger, it causes the drop-down menu to disappear - whenever you move the mouse down from the static object to select one of the options. I'm not sure what I need to alter in order to make the menu work with larger text.

Below is the full CSS code and an example of the HTML:

.Header h1 {text-shadow: 2px 2px #FFFFFF; } 
/*----- MBT Drop Down Menu ----*/ 

#mbtnavbar { 
/* background: #897768; */ 
width: 100%; 
color: #897768; 
margin: 0px; 
padding: 0; 
position: relative; 
border-top:0px solid #FFF; 
height: auto; 
} 

#mbtnav { 
background: #FFF; 
margin: 0; 
padding: 0; 
} 

#mbtnav ul { 
float: left; 
list-style: none; 
margin: 0; 
padding: 0; 
} 

#mbtnav li { 
list-style: none; 
margin: 0; 
padding: 0; 
/* border-left:1px solid #333; 
border-right:1px solid #333; */ 
height:41px; 
} 

#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited { 
color: #4F4F4F; 
display: block; 
font:bold 15px Crushed, sans-serif; 
margin: 0; 
padding:9px 12px 10px 12px; 
text-decoration: none; 
} 

#mbtnav li a:hover, #mbtnav li a:active { 
background: #FFFFFF; 
color: #65a5b2; 
display: block; 
text-decoration: none; 
margin: 0; 
padding: 9px 12px 10px 12px; 
} 

#mbtnav li { 
float: left; 
padding: 0; 
} 

#mbtnav li ul { 
z-index: 9999; 
position: absolute; 
left: -999em; 
height: 200px; 
width: 200px; 
margin: 0; 
padding: 0; 
} 

#mbtnav li ul a { 
width: 180px; 
} 

#mbtnav li ul ul { 
margin: -35px 0 0 161px; 
} 

#mbtnav li:hover ul ul, #mbtnav li:hover ul ul ul, #mbtnav li.sfhover ul ul, #mbtnav li.sfhover ul ul ul { 
left: -999em; 
} 

#mbtnav li:hover ul, #mbtnav li li:hover ul, #mbtnav li li li:hover ul, #mbtnav li.sfhover ul, #mbtnav li li.sfhover ul, #mbtnav li li li.sfhover ul { 
left: auto; 
} 

#mbtnav li:hover, #mbtnav li.sfhover { 
position: static; 
} 

#mbtnav li li a, #mbtnav li li a:link, #mbtnav li li a:visited { 
background: #897768; 
/* width: 140px; */ 
color: #FFF; 
display: block; 
font:bold 13px Futura, Impact, Helvetica, Arial, sans-serif; 
margin: 0; 
padding: 9px 12px 10px 12px; 
text-decoration: none; 
z-index:9999; 
border-bottom:0px; 
} 

#mbtnav li li a:hover, #mbtnavli li a:active { 
background: #897768; 
color: #000000; 
display: block; 
margin: 0; 
padding: 9px 12px 10px 12px; 
text-decoration: none; 
} 

.tabs-inner .widget #mbtnavbar li a { 
border-left:none; 
} 

.tabs-outer .widget, .section { 
margin:0; 
} 

.tabs-inner { 
padding: 0px; 
}

HTML:

    <div id="mbtnavbar">
    <ul id="mbtnav">

    <li>
    <a href="URL">Home</a>
    </li>


    <li>
     <a href="URL">About</a>
      <ul>
          <li><a href="URL">#1</a></li>  
          <li><a href="URL">#2</a></li>
          <li><a href="URL">#3</a></li>
        </ul>
    </li>


    </ul>
    </div>
htmlcssdrop-down-menu

Answers

answered 5 years ago Abhishek #1

I gave this,and its working..Do you want something like this?

 #mbtnav li li a, #mbtnav li li a:link, #mbtnav li li a:visited { 
background: #897768; 
/* width: 140px; */ 
color: #FFF; 
display: block; 
font:bold 13px Futura, Impact, Helvetica, Arial, sans-serif; 
margin: 0; 
padding: 9px 12px 10px 12px; 
text-decoration: none; 
z-index:9999; 
border-bottom:0px; 
font-size:20px;
} 

comments powered by Disqus