CSS Drop Down Menu Disappears - html

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>
Home
</li>
<li>
About
<ul>
<li>#1</li>
<li>#2</li>
<li>#3</li>
</ul>
</li>
</ul>
</div>

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

Related

Vertical Lines Appearing HTML/CSS

I'm trying to put a drop down menu on Blogger and found one that actually works. The only problem is that these three thin black vertical lines appear underneath the menu. I can't figure out what in the code is causing them, or if it's something else entirely. I've tried editing the borders, but it doesn't seem to do anything. The site uses HTML/CSS.
/----- MBT Drop Down Menu ----/
#mbtnavbar {
background: #000000;
width: 960px;
color: #FFF;
margin: 0px;
padding: 0;
position: relative;
height:35px;
}
#mbtnav {
margin: 0;
padding: 0;
}
#mbtnav ul {
float: left;
list-style: none;
margin: 0;
padding: 0;
}
#mbtnav li {
list-style: none;
margin: 0;
padding: 0;
height:35px;
}
#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited {
color: #FFF;
display: block;
font:normal 18px josefin sans; margin: 0;
padding: 17px 12px 10px 12px;
text-decoration: none;
}
#mbtnav li a:hover, #mbtnav li a:active {
background: #E3E4FA;
color: #000000;
display: block;
text-decoration: none;
margin: 0;
padding:17px 12px 10px 12px;
}
#mbtnav li {
float: left;
padding: 0;
}
#mbtnav li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: 100%;
width: 160px;
margin: 0;
padding: 0;
}
#mbtnav li ul a {
width: 140px;
}
#mbtnav li ul ul {
margin: -25px 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: #000000;
width: 120px;
color: #FFF;
display: block;
font:normal 15px josefin sans, sans-serif;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
z-index:9999;
border-bottom:1px dotted #333;
}
#mbtnav li li a:hover, #mbtnavli li a:active {
background: #E3E4FA;
color: #000000;
display: block; margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}

How do we make the sub drop down menu in a html/css code to appear from the top of the drop down menu?

When i hover the mouse over the links a sub drop down menu appears starting right from the link itself and the sub drop down menu appearing goes down?
How do i make it appear from the top of the menu that is to say the first link in the drop down menu?
here is the code i got
<style>
#mbtnavbar {
background: #3B5998;
width: 100%;
color: #FFF;
margin: -50px 0;
padding: 0;
position: relative;
border-top:0px solid #960100;
height:35px;
}
#mbtnav {
margin: 0;
padding: 0;
}
#mbtnav ul {
float: left;
list-style: none;
margin: 0;
padding: 0;
}
#mbtnav li {
list-style: none;
margin: 0;
padding: 0;
}
#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited {
color: #FFF;
display: block;
font:bold 16px Helvetica, sans-serif;
margin: 0;
padding: 9px 16px 11px 16px;
text-decoration: none;
border-right:0px solid #627AAD;
}
#mbtnav li a:hover, #mbtnav li a:active {
background: #627AAD;
color: #FFF;
display: block;
text-decoration: none;
margin: 0;
padding: 9px 16px 11px 16px;
}
#mbtnav li {
float: left;
padding: 0;
}
#mbtnav li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: auto;
width: 140px;
margin: 0;
padding: 0;
}
#mbtnav li ul a {
width: 140px;
}
#mbtnav li ul ul {
margin: -25px 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: #EDEFF4;
width: 120px;
color: #3B5998;
display: block;
font:normal 12px Helvetica, sans-serif;
margin: 1px 0 0 0;
padding: 9px 16px 10px 16px;
text-decoration: none;
z-index:9999;
border:1px solid #ddd;
-moz-border-radius:8px;
-webkit-border-radius:8px;
}
#mbtnav li li a:hover, #mbtnav li li a:active {
background: #627AAD;
color: #FFF;
display: block;
}
#mbtnav li li li a, #mbtnav li li li a:link, #mbtnav li li li a:visited {
background: #EDEFF4;
width: 120px;
color: #3B5998;
display: block;
font:normal 16px Helvetica, sans-serif;
padding: 9px 16px 10px 16px;
text-decoration: none;
z-index:9999;
border:1px solid #ddd;
margin: 1px 0 0 -14px;
}
#mbtnav li li li a:hover, #mbtnav li li li a:active {
background: #627AAD;
color: #FFF;
display: block;
overflow:visible
}
</style>

How to get my tabs centered>

I have tried making making all the margins 0 auto, I tried changing all the Float: (to center instead of left) this just centered my tabs in the middle of the page going down rather than across. What should I change and where? Do I change just the CSS or the html too?
My blog:
(http://icantaffordmylifestyle.blogspot.com/)
My HTML:
<center>
<div id='mbtnavbar'>
<ul id='mbtnav'>
<li> <a href=/ >| HOME</a>
</li>
<li>
| ABOUT
</li>
<li>| LIFESTYLE
<ul>
<li>| MUSIC</li>
<li>| DIY</li>
<li>| MY ART</li>
<li>| NAIL ART</li>
<li>| BEAUTY</li>
</ul>
</li>
<li>| FASHION
<ul>
<li>| OOTD FASHIONS</li>
<li>| LIFESTYE LOOKS</li>
<li>| FASHION RECAPS</li>
</ul>
<li>| OM-NOMNOM
<ul>
<li>| NOM DIARIES</li>
<li>| NOM-ventures</li>
<li>| LINKS TO MY DRINKS</li>
<li>| HEALTHY NOMS</li>
</ul>
</li>
<li>
| WISH LIST
</li>
<li> | CONTACT
<ul>
<li>| SERVICES</li>
<li>| DISCLAIMER</li>
</ul>
<!-- etc. -->
</li></li></ul></div>
</center>
My CSS:
<center>
#mbtnavbar {
/* background: #ffffff; */
width: auto;
color: #3cd0b6;
margin: 0 auto;
padding: 0;
position: relative;
border-top:0px solid #ffffff;
height: 40px;
vertical-align: text-middle;
}
#mbtnav {
background: #ffffff;
margin: 0;
padding: 0;
}
#mbtnav ul {
float: center;
list-style: none;
margin: 0;
padding: 0;
}
#mbtnav li {
list-style: none;
margin: 0;
padding: 0;
/* border-left:1px solid#ffffff;
border-right:1px solid #ffffff; */
vertical-align: text-middle;
}
#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited {
color: #3cd0b6;
display: inline-block;
font:bold 24px sue ellen francisco;
margin: 0;
padding: 6px 9px 7px 9px;
text-decoration: none;
}
#mbtnav li a:hover, #mbtnav li a:active {
background: #ffffff;
color: #FC9F35;
display: inline-block;
text-decoration: none;
margin: 0;
padding: 6px 9px 7px 9px;
}
#mbtnav li {
float: left;
padding: 0;
}
#mbtnav li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: 40;
width: 200px;
margin: 0 auto;
padding: 0;
}
#mbtnav li ul a {
width: 200px;
}
#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: #ffffff;
/* width: 200px; */
color: #3cd0b6;
display: inline-block;
font:bold 19px sue ellen francisco;
margin: 0 auto;
padding: 6px 9px 7px 9px;
text-decoration: none;
z-index:9999;
border-bottom:1px dotted #333;
}
#mbtnav li li a:hover, #mbtnavli li a:active {
background: #ffffff;
color: #FC9F35;
display: block;
margin: 0 auto;
padding: 6px 9px 7px 9px;
text-decoration: none;
}
.tabs-inner .widget #mbtnavbar li a {
border-left:none;
}
.tabs-outer .widget, .section {
margin:0 auto;
}
.tabs-inner {
padding: 0px;
}
Just add display: inline-block; to #mbtnav

Why are my drop down menus unclickable and my pages tabs are not consistently functioning?

So I see some variations of my question we asked, but none of the solutions worked for my blog. http://icantaffordmylifestyle.blogspot.com/
So I've been messing around with perfecting this code for days now and it's driving me nuts that I can't figure it out. The About, Contact, lifestyle, and Om-Nomnom page are all not opening up if I have clicked one of the other tabs first. I have to click the home link first to refresh. So It only works if it is the first one to be clicked on or I go home before clicking a new link. Then the drop down boxes won't work either! They worked fine when I was still trying to get the links to work at all and had it at the bottom of my page, but now that I have moved it to the top of my page where it belongs it stopped working. The drop box disappears too quickly to click on anything unless I move it fast enough and in just the right spot. How do I get my links to work more consistently and get the drop downs to work better?
Here is the html:
<div id='mbtnavbar'>
<ul id='mbtnav'>
<li> <a href=/ >| HOME/</a>
</li>
<li>
| ABOUT
</li>
<li>
| CONTACT/ SERVICES
</li>
<li>
| LIFESTYE LOOKS
</li>
<li>
| OOTD FASHIONS
</li>
<li>| LIFESTYLE
<ul>
<li>| MUSIC</li>
<li>| DIY</li>
<li>| MY ART</li>
<li>| NAIL ART</li>
<li>| LIFE</li>
</ul>
</li>
<li>| OM-NOMNOM
<ul>
<li>| NOM DIARIES</li>
<li>| NOM-ventures</li>
<li>| LINKS TO MY DRINKS</li>
<li>| HEALTHY NOMS</li>
</ul>
</li>
<!-- etc. -->
</ul></div>
& the CSS is here:
/*----- MBT Drop Down Menu ----*/
<center>
#mbtnavbar {
/* background: #ffffff; */
width: 100%;
color: #3cd0b6;
margin: 0px;
padding: 0;
position: relative;
border-top:0px solid #ffffff;
height: 41px;
vertical-align: text-middle;
}
#mbtnav {
background: #ffffff;
margin: 0;
padding: 0;
}
#mbtnav ul {
float: center;
list-style: none;
margin: 0;
padding: 0;
}
#mbtnav li {
list-style: none;
margin: 0;
padding: 0;
/* border-left:1px solid#ffffff;
border-right:1px solid #ffffff; */
height:41px;
vertical-align: text-middle;
}
#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited {
color: #3cd0b6;
display: block;
font:bold 24px sue ellen francisco;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
#mbtnav li a:hover, #mbtnav li a:active {
background: #ffffff;
color: #3cd0b6;
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: auto;
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: #ffffff;
/* width: 140px; */
color: #3cd0b6;
display: block;
font:bold 16px sue ellen francisco;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
z-index:9999;
border-bottom:1px dotted #333;
}
#mbtnav li li a:hover, #mbtnavli li a:active {
background: #ffffff;
color: #FC9F35;
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;
}
Remove your li height:
#mbtnav li {
list-style: none;
margin: 0;
padding: 0;
height: 41px; <-this one
vertical-align: text-middle;
}

Images of list items repeats in html

The images of list items in dropdown menu repeats three times even though "no repeat" is added in html. please help me.
html code.
<div class="menu">
<ul>
<li style='background-image:url(images/menu2s.jpg)0 0 no-repeat;'><a></a>
<ul>
<li style='background-image:url(images/sets.jpg)0 0 no-repeat;'>Settings</li>
<li style='background-image:url(images/more-icon.png)0 0 no-repeat;'>More</li>
</ul>
</li>
</ul>
</div>
css file
body{padding: 3em; }
.menu * {
padding:0;
margin: 0;
font: 12px georgia;
list-style-type:none;}
.menu {
position: absolute;
bottom:0px;
float: left;
line-height: 10px;
left: 100px;
z-index: 50;}
.menu a {
display: block;
text-decoration: none;
color: #3B5330;}
.menu a:hover { background: #B0BD97;}
.menu ul li ul li a:hover {
background: #ECF1E7;
padding-left:9px;
border-left: solid 1px #000;}
.menu ul li ul li {
width: 140px;
border: none;
color: #B0BD97;
padding-top: 3px;
padding-bottom:3px;
padding-left: 3px;
padding-right: 3px;
background: #B0BD97;
z-index:50;
}
.menu ul li ul li a {
font: 22px arial;
font-weight:normal;
font-variant: small-caps;
padding-top:3px;
padding-bottom:3px;
z-index:50;}
.menu ul li {
float: left;
width: 146px;
font-weight: bold;
border-top: solid 1px #283923;
border-bottom: solid 1px #283923;
background: #979E71;
z-index:50;}
.menu ul li a {
font-weight: bold;
padding: 15px 10px;
z-index:50;}
.menu li{
position:relative;
float:left;
z-index:50;}
.menu ul li ul, #menu:hover ul li ul, #menu:hover ul li:hover ul li ul{
display:none;
list-style-type:none;
width: 140px;
z-index:50;}
.menu:hover ul, #menu:hover ul li:hover ul, #menu:hover ul li:hover ul li:hover ul {
display:block;
z-index:50;}
.menu:hover ul li:hover ul li:hover ul {
position: absolute;
margin-left: 145px;
margin-top: -22px;
font: 10px;
z-index:50;}
.menu:hover ul li:hover ul {
position: absolute;
margin-top: 1px;
font: 10px;
z-index:50;
}
.menu>ul>li:hover>ul {
bottom:100%;
border-bottom: 1px solid transparent
z-index:50;
}
Write it like this. You wrote shorthand in background-image rather than Background.
style='background:url(images/sets.jpg) 0 0 no-repeat;
> or
style='background:url(images/sets.jpg) no-repeat 0 0 ;
You have not given space between the brace and zero.