Ive been following a tutorial reference a drop down menu, and so far i have managed to do the following:
http://jsfiddle.net/rusticblonde/NZVRq/2/
However on the hoverover the submenu seems to have an massive gap on the hover over color. Do i change the ul ul li?
this is the code so far:
#cssmenu ul { margin: 0; padding: 0;}
#cssmenu li { margin: 0; padding: 0;}
#cssmenu a { margin: 0; padding: 0;}
#cssmenu ul {list-style: none;}
#cssmenu ul ul {padding: 0;}
#cssmenu a {text-decoration: none;}
#cssmenu {height: 70px; background-color: rgb(35,35,35); box-shadow: 0px 2px 3px rgba(0,0,0,.4);}
#cssmenu ul li {
float: left;
margin-left: 15px;
position: relative;
}
#cssmenu ul li a {
color: rgb(160,160,160);
font-family: Verdana, 'Lucida Grande';
font-size: 15px;
line-height: 70px;
padding: 15px 20px;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-o-transition: color .15s;
transition: color .15s;
}
#cssmenu ul li a:hover {color: rgb(250,250,250); }
#cssmenu ul li ul {
opacity: 0;
visibility: hidden;
background-color: rgb(250,250,250);
text-align: left;
position: absolute;
top: 55px;
left: 50%;
margin-left: -90px;
width: 180px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
box-shadow: 0px 1px 3px rgba(0,0,0,.4);
}
#cssmenu ul li:hover > ul {
opacity: 1;
top: 65px;
visibility: visible;
}
#cssmenu ul li > ul:before{
content: '';
display: block;
border-color: transparent transparent rgb(250,250,250) transparent;
border-style: solid;
border-width: 10px;
position: absolute;
top: -20px;
left: 50%;
margin-left: -10px;
}
#cssmenu ul ul li { position: relative;}
#cssmenu ul ul a{
color: rgb(50,50,50);
font-family: Verdana, 'Lucida Grande';
font-size: 13px;
background-color: rgb(250,250,250);
display: block;
-webkit-transition: background-color .1s;
-moz-transition: background-color .1s;
-o-transition: background-color .1s;
transition: background-color .1s;
}
#cssmenu ul ul a:hover {background-color: rgb(240,240,240);}
#cssmenu ul ul ul {
visibility: hidden;
opacity: 0;
position: absolute;
top: -16px;
left: 206px;
background-color: rgb(250,250,250);
text-align: left;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
box-shadow: 0px 1px 3px rgba(0,0,0,.4);
}
#cssmenu ul ul > li:hover > ul { opacity: 1; left: 196px; visibility: visible;}
#cssmenu ul ul a:hover{
background-color: rgb(205,44,36);
color: rgb(240,240,240);
}
Thanks
If i understand you correctly you want to remove the red gaps above/bellow the text in the popup right?
You can do this by giving the <a> tag inside the popup a smaller line-height. At the moment the huge gap comes from the large line-height in the rule #cssmenu ul li a {
Related
My website is www.teamanco.com I'm having trouble with the hover on my nested menu. If you go to the second level, it's fine, but the menu in the third level has a messed up selection/hover. Help? I have no idea where to start. I'm built on shopify.
}
.main-nav {
float: left;
padding: 0;
margin: 0;
list-style: none;
width: 100%;
}
.main-nav > li:hover > ul {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
height: auto;
overflow: visible;
}
.main-nav > li:hover > ul > li:hover > a {
color: {{ settings.main_nav_link_hover }};
background-color: #eaeaea;
}
.main-nav > li:hover > ul > li:hover > ul {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
height: auto;
overflow: visible;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > a {
color: {{ settings.main_nav_link_hover }};
background-color: #eaeaea;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > ul {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
height: auto;
overflow: visible;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > a {
color: {{ settings.main_nav_link_hover }};
background-color: #eaeaea;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > ul {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
height: auto;
overflow: visible;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > a {
color: {{ settings.main_nav_link_hover }};
background-color: #eaeaea;
}
.main-nav > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > ul > li:hover > ul {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
height: auto;
overflow: visible;
}
.main-nav > li {
float: left;
margin-left: 60px;
border-top: solid 2px transparent;
margin-top: -2px;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
position: relative;
}
.main-nav > li:first-child {
margin-left: 0px;
}
.main-nav > li.active {
border-top: solid 2px {{ settings.main_nav_link }};
}
.main-nav > li.active > a {
color: {{ settings.main_nav_link_hover }};
}
.main-nav > li:hover {
border-top: solid 2px {{ settings.main_nav_link }};
}
.main-nav > li:hover > a {
color: {{ settings.main_nav_link_hover }};
}
.main-nav > li > a {
font-family: "{{ settings.secondary_font }}", Arial, sans-serif;
font-size: 16px;
padding:12px 0px 11px;
float:left;
color: {{ settings.main_nav_link }};
text-decoration: none;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.main-nav > li > a.has-dropdown {
position: relative;
}
.main-nav > li > a.has-dropdown:after {
content: "";
position: absolute;
border-right: 4px solid transparent;
border-top: 4px solid {{ settings.main_nav_link }};
border-left: 4px solid transparent;
border-top-color: {{ settings.main_nav_link }};
top: 7px;
right: -14px;
}
.main-nav > li > ul {
position: absolute;
top: 100%;
left: 0px;
width: 150px;
background-color: #f2f2f2;
padding: 10px 0;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
list-style: none;
margin: 0;
z-index: 201;
-webkit-border-radius: 0 0 4px 4px;
-webkit-background-clip: padding-box;
-moz-border-radius: 0 0 4px 4px;
-moz-background-clip: padding;
border-radius: 0 0 4px 4px;
background-clip: padding-box;
height: 0;
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
overflow: hidden;
-webkit-transition: opacity 0.4s ease-in-out;
-moz-transition: opacity 0.4s ease-in-out;
-o-transition: opacity 0.4s ease-in-out;
-ms-transition: opacity 0.4s ease-in-out;
transition: opacity 0.4s ease-in-out;
}
.main-nav > li > ul > li {
float: left;
width: 100%;
position: relative;
}
.main-nav > li > ul > li:hover > a {
color: {{ settings.main_nav_link_hover }};
background-color: #eaeaea;
}
.main-nav > li > ul > li > a {
float: left;
width: 100%;
padding: 10px 15px;
font-family: "{{ settings.secondary_font }}", Arial, sans-serif;
font-size: 14px;
color: {{ settings.main_nav_link }};
text-decoration: none;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.main-nav > li > ul > li ul {
position: absolute;
top: 0px;
left: 100%;
width: 150px;
background-color: #f2f2f2;
padding: 10px 0;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
list-style: none;
margin: 0;
z-index: 200;
-webkit-border-radius: 0 0 4px 4px;
-webkit-background-clip: padding-box;
-moz-border-radius: 0 0 4px 4px;
-moz-background-clip: padding;
border-radius: 0 0 4px 4px;
background-clip: padding-box;
height: 0;
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
overflow: hidden;
-webkit-transition: opacity 0.4s ease-in-out;
-moz-transition: opacity 0.4s ease-in-out;
-o-transition: opacity 0.4s ease-in-out;
-ms-transition: opacity 0.4s ease-in-out;
transition: opacity 0.4s ease-in-out;
}
.main-nav > li > ul > li ul li {
float: left;
width: 100%;
position: relative;
}
.main-nav > li > ul > li ul li a {
float: left;
width: 100%;
padding: 10px 15px;
font-family: "{{ settings.secondary_font }}", Arial, sans-serif;
font-size: 14px;
color: {{ settings.main_nav_link }};
text-decoration: none;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
If you move your mouse left and right across the top navigation level, you'll see the same problem you described when you hover over the second level. A skinny grey box appears to hang around momentarily after you move your mouse away and the list has disappeared. It's caused by the padding on the <ul> tags. Remove these lines and see if that fixes the issue:
.main-nav > li > ul {
...
padding: 10px 0;
...
}
.main-nav > li > ul > li ul {
...
padding: 10px 0;
...
}
It appears as though the list items (<li>) disappear instantly when you move your mouse away, but the opacity of the <ul> (which only contains padding now) fades away with the transition.
I've been trying for a while now to center everything that's in my Navigation Bar. Here's my CSS and HTML code I would appreciate it if anyone could give me a hint on what to do.
#cssmenu ul {
margin: 0;
padding: 0;
}
#cssmenu li {
margin: 0;
padding: 0;
}
#cssmenu a {
margin: 0;
padding: 0;
}
#cssmenu ul {
list-style: none;
}
#cssmenu a {
text-decoration: none;
}
#cssmenu {
height: 70px;
background-color: #232323;
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.4);
width: auto;
text-align: center;
}
#cssmenu > ul > li {
float: left;
margin-left: 15px;
position: relative;
}
#cssmenu > ul > li > a {
color: #a0a0a0;
font-family: Verdana, 'Lucida Grande';
font-size: 15px;
line-height: 70px;
padding: 15px 20px;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-o-transition: color .15s;
transition: color .15s;
}
#cssmenu > ul > li > a:hover {
color: #ffffff;
}
#cssmenu > ul > li > ul {
opacity: 0;
visibility: hidden;
padding: 16px 0 20px 0;
background-color: #fafafa;
text-align: left;
position: absolute;
top: 55px;
left: 50%;
margin-left: -90px;
width: 180px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
}
#cssmenu > ul > li:hover > ul {
opacity: 1;
top: 65px;
visibility: visible;
}
#cssmenu > ul > li > ul:before {
content: '';
display: block;
border-color: transparent transparent #fafafa transparent;
border-style: solid;
border-width: 10px;
position: absolute;
top: -20px;
left: 50%;
margin-left: -10px;
}
#cssmenu > ul ul > li {
position: relative;
}
#cssmenu ul ul a {
color: #323232;
font-family: Verdana, 'Lucida Grande';
font-size: 13px;
background-color: #fafafa;
padding: 5px 8px 7px 16px;
display: block;
-webkit-transition: background-color 0.1s;
-moz-transition: background-color 0.1s;
-o-transition: background-color 0.1s;
transition: background-color 0.1s;
}
#cssmenu ul ul a:hover {
background-color: #f0f0f0;
}
#cssmenu ul ul ul {
visibility: hidden;
opacity: 0;
position: absolute;
top: -16px;
left: 206px;
padding: 16px 0 20px 0;
background-color: #fafafa;
text-align: left;
width: 180px;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
}
#cssmenu ul ul > li:hover > ul {
opacity: 1;
left: 190px;
visibility: visible;
}
#cssmenu ul ul a:hover {
background-color: #cc2c24;
color: #f0f0f0;
}
And finally my HTML.
<div id='cssmenu'>
<ul>
<li class='active'><a href='index.html'><span>Home</span></a></li>
<li><a href='#'><span>Forums</span></a></li>
<li><a href='#'><span>Title1</span></a></li>
<li><a href='#'><span>Title2</span></a></li>
<li><a href='#'><span>Title3</span></a></li>
<li class='last'><a href='#'><span>Title4</span></a></li>
</ul>
</div>
Currently all that happens is my navigation bar is 100% width which is what I want but, the buttons are still aligned to the left and I want them to be in the center. I've tried numerous things and can't seem to make it work. Any help is greatly appreciated.
You only need this :
#cssmenu > ul {
display:table;
margin:0 auto;
}
View the demo http://jsfiddle.net/sn3Hn/2/
Use same structure, but you need change your css:
#cssmenu ul
{
text-align: center;
}
#cssmenu li
{
display: inline-block; < Secret;
margin: 0;
padding: 0;
}
Codepen > http://cdpn.io/usChr
Resolve?
Good lucky
I've had success using the css table method.
#cssmenu ul {
display: table;
width: 100%;
}
#cssmenu ul li {
display: table-cell;
}
My site has one drop down menu which does not work in iOS or on android. I know the problem is due to the lack of cursor on these devices, so I'm looking to switch the menu from a hover action to a clickable one. I lack the proper terms to speak intelligently on this subject so hopefully what I'm asking makes sense. www.salvageinteriors.com
Here's my code:
CSS:
#cssmenu ul {
margin: 0;
padding: 0;
}
#cssmenu li {
margin: 0;
padding: 0;
z-index: 29;
}
#cssmenu a {
margin: 0;
padding: 0;
}
#cssmenu ul {
list-style: none;
}
#cssmenu a {
text-decoration: none;
}
#cssmenu {
height: 31px;
background-color: #ffffff;
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.4);
width: 940px;
}
#cssmenu > ul > li {
float: left;
margin-left: 45px;
margin-top: -20px;
position: relative;
}
#cssmenu > ul > li > a {
color: #000000;
font-family: calibri;
font-size: 18px;
line-height: 70px;
padding: 15px 20px;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-o-transition: color .15s;
transition: color .15s;
}
#cssmenu > ul > li > a:hover {
color: #000000;
}
#cssmenu > ul > li > ul {
opacity: 0;
visibility: hidden;
padding: 16px 0 20px 0;
background-color: #000000;
text-align: left;
position: absolute;
top: 55px;
left: 50%;
margin-left: -90px;
width: 180px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.4);
}
#cssmenu > ul > li:hover > ul {
opacity: 1;
top: 65px;
visibility: visible;
}
#cssmenu > ul > li > ul:before {
content: '';
display: block;
border-color: transparent transparent #000000 transparent;
border-style: solid;
border-width: 10px;
position: absolute;
top: -20px;
left: 50%;
margin-left: -10px;
}
#cssmenu > ul ul > li {
position: relative;
}
#cssmenu ul ul a {
color: #ffffff;
font-family: Verdana, 'Lucida Grande';
font-size: 13px;
background-color: #000000;
padding: 5px 8px 7px 16px;
display: block;
-webkit-transition: background-color 0.1s;
-moz-transition: background-color 0.1s;
-o-transition: background-color 0.1s;
transition: background-color 0.1s;
}
#cssmenu ul ul a:hover {
background-color: #000000;
}
#cssmenu ul ul ul {
visibility: hidden;
opacity: 0;
position: absolute;
top: -16px;
left: 206px;
padding: 16px 0 20px 0;
background-color: #ffffff;
text-align: left;
width: 180px;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
}
#cssmenu ul ul > li:hover > ul {
opacity: 1;
left: 190px;
visibility: visible;
}
#cssmenu ul ul a:hover {
background-color: #ffffff;
color: #000000;
}
HTML:
<div id='cssmenu'>
<ul>
<li class='has-sub'><a href='http://www.salvageinteriors.com/p/work.html'> <span>Work</span></a>
<ul>
<li><a href='http://www.salvageinteriors.com/p/commercial.html'><span>Commercial Fixtures</span></a></li>
<li><a href='http://www.salvageinteriors.com/p/furniture_13.html'><span>Furniture</span></a></li>
<li class='last'><a href='http://www.salvageinteriors.com/p/accoutrements.html'><span>Accoutrements</span></a></li>
</ul>
</li>
<li><a href='http://www.salvageinteriors.com/p/about.html'><span>About</span></a></li>
<li><a href='http://www.salvageinteriors.com/p/clients.html'><span>Clients</span></a></li>
<li><a href='http://www.salvageinteriors.com/p/press.html'><span>Press</span></a></li>
<li><a href='http://salvageinteriors.bigcartel.com/' target='_blank'><span>Shop</span></a></li>
<li><a href='http://salvageinteriorsblog.com/' target='_blank'><span>Blog</span></a></li>
<li class='last'><a href='http://www.salvageinteriors.com/p/contact.html'> <span>Contact</span></a></li>
</ul>
</div>
honestly, at least until everyone can figure out hovers for touch devices, we're kind of screwed when it comes to this stuff. There are two ways to work around this:
1) put all of your hover declarations behind a touch class and use Modernizr to add a touch class to your body element whenever the device is detected to be touch enabled.
2)Or you can just put your hover declarations inside of a media query that targets anything over 1024px.
Neither of these are very good solutions, but I will be the first to admit that I have used them before. I would probably use Modernizr if possible.
Down below the picture is my code for my css menu where it says
Sub Item i want that area to popup on the left of where it says Product1
thank you soo much in advance.. i used CSS menu makers to make this but they dont have an option to chose where it floats
im posting my code below the image
/** Body Of Website */
body{
background-image:url('/images/background.png');
background-color:#0a1857;
}
/** Advanced css menu */
#cssmenu ul { margin: 0; padding: 0;}
#cssmenu li { margin: 0; padding: 0;}
#cssmenu a { margin: 0; padding: 0;}
#cssmenu ul {list-style: none;}
#cssmenu a {text-decoration: none;}
#cssmenu {height: 70px; background-color: rgb(35,35,35); box-shadow: 0px 2px 3px rgba(0,0,0,.4);}
#cssmenu > ul > li {
float: left;
margin-left: 35px;
position: relative;
}
#cssmenu > ul > li > a {
color: rgb(160,160,160);
font-family: Verdana, 'Lucida Grande';
font-size: 15px;
line-height: 70px;
padding: 15px 20px;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-o-transition: color .15s;
transition: color .15s;
}
#cssmenu > ul > li > a:hover {color: rgb(250,250,250); }
#cssmenu > ul > li > ul {
opacity: 0;
visibility: hidden;
padding: 16px 0 20px 0;
background-color: rgb(250,250,250);
text-align: left;
position: absolute;
top: 55px;
left: 50%;
margin-left: -90px;
width: 180px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
box-shadow: 0px 1px 3px rgba(0,0,0,.4);
}
#cssmenu > ul > li:hover > ul {
opacity: 1;
top: 65px;
visibility: visible;
}
#cssmenu > ul > li > ul:before{
content: '';
display: block;
border-color: transparent transparent rgb(250,250,250) transparent;
border-style: solid;
border-width: 10px;
position: absolute;
top: -20px;
left: 50%;
margin-left: -10px;
}
#cssmenu > ul ul > li { position: relative;}
#cssmenu ul ul a{
color: rgb(50,50,50);
font-family: Verdana, 'Lucida Grande';
font-size: 13px;
background-color: rgb(250,250,250);
padding: 5px 8px 7px 16px;
display: block;
-webkit-transition: background-color .1s;
-moz-transition: background-color .1s;
-o-transition: background-color .1s;
transition: background-color .1s;
}
#cssmenu ul ul a:hover {background-color: rgb(240,240,240);}
#cssmenu ul ul ul {
visibility: hidden;
opacity: 0;
position: absolute;
top: -16px;
left: 206px;
padding: 16px 0 20px 0;
background-color: rgb(250,250,250);
text-align: left;
width: 160px;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4);
box-shadow: 0px 1px 3px rgba(0,0,0,.4);
}
#cssmenu ul ul > li:hover > ul { opacity: 1; left: 196px; visibility: visible;}
#cssmenu ul ul a:hover{
background-color: rgb(205,44,36);
color: rgb(240,240,240);
}
Have a look at this apply the following style or change the value for "left" if you want
#cssmenu ul ul > li:hover > ul {
left: -50px; **Change this to whatever you want to**
opacity: 1;
visibility: visible;
}
^ this is on line number 105 of your CSS stylesheet.
Hope this helps! Let me know how it goes :)
UPDATE:-
Change this as well
#cssmenu ul ul ul {
left: -50px; /* Change this to whatever value you used for the above "left" attribute */
This should fix the strange transition issue.
Cant you manually position the sub menu?
Just add a class to the sub menu, and
subnav { position: absolute; top:10;left:10; }?
Can some one help me align my navigation center please
http://sketchedneo.com/Example.php
I have tried
left: 25%;
align:center;
alignment-adjust: middle;
It just doesnt seem to want to go middle.
Any suggestions are greatly appreciated
div#navigation{ position: absolute;
padding-top:-100px;
border-radius: 4px;
}
#navigation ul {
padding:5px 1px 1px 1px;
margin: 0;
list-style: none;
float:left; text-align:left;
}
#pad{padding:0px 0px 0px 70px;}
#navigation li {
float: left;
position: relative;
}
#navigation ul li a{
display:block;
padding:5px 1px 1px 1px;
margin:0px;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
text-decoration: none;
white-space:nowrap;
}
#navigation ul ul{
position:absolute;
top:-99999px;
left:0;
opacity: 0; /* Hide sub level */
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
z-index:497;
background:#95cfff;
padding: 2px; border:1px solid #000000; border-top:1px solid #000000;
border-bottom-left-radius:6px;
border-bottom-right-radius:6px;
}
#navigation ul ul ul {
position:absolute;
top:-99999px;
left:100%;
opacity: 0; /* Hide sub level */
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
z-index:497;
background:#a1e8dc;
padding: 2px; border:1px solid #000000;
border-top-left-radius:6px;
border-top-right-radius:6px;
border-bottom-left-radius:6px;
border-bottom-right-radius:6px;
}
#navigation ul li:hover>ul{ opacity: 1; position:absolute; top:99%; left:0; }
#navigation ul ul li:hover>ul{ position:absolute; top:0; left:100%; opacity: 1; z-index:497; background:#95cfff; }
#navigation a:link,#navigation a:visited, #navigation a:active {
color: #002b4f;
font-weight: normal;
text-align: center;
text-decoration: none;
}
#navigation a:hover {
color: #0059d2;
font-weight: normal;
text-align: center;
text-decoration: none;
} a.top:link, a.top:visited, a.top:active {
color: #002b4f;
font-weight: normal;
text-align: center;
text-decoration: none;
}
I have used this guy's technique in the past a few time and it works great:
http://pmob.co.uk/pob/centred-float.htm