Drop down menu hover issues - css

I am about read to pull my hair out! Whenever you over over the dropdown navigational menu, the hover image drops below where it should be and stretches. Then the dropdown area disappears when you try to mouse to it. You can see this in action at http://pauldrayton.com/sites/waterdamagesegeorgia/. I've tried playing with the z-index to see if that could be the issue, but I have yet to figure it out!
Here's the CSS. Any help would be appreciated.
#access {
display: block;
float: left;
margin: 0 ;
margin-right:24px;
margin-top:-30px;
border-bottom: 2px solid #CCC ;
width: 990px;
z-index: 100;
}
#access .menu-header,
div.menu {
font-size: 14px;
margin-left: 12px;
}
#access .menu-header ul,
div.menu ul {
list-style: none;
float:right;
position:relative;
margin: 0 0;
margin-right:24px;
}
#access .menu-header ul.sub-menu li {
box-shadow: 3px 3px 3px #999;
-moz-box-shadow: 3px 3px 3px #999;
-webkit-box-shadow: 3px 3px 3px #999; }
#access .menu-header li,
div.menu li {
float: right;
position: relative;
padding:0px;
background:url(images/mantra_menu.png) top left no-repeat;
height: 27px;
margin-right:10px;
z-index: 101;
}
#access li.current_page_item {
background:url(images/mantra_menu_current.png) top left no-repeat;
border-bottom:none;
}
#access li.current-menu-item {
background:url(images/mantra_menu_current.png) top left no-repeat;
border-bottom:none;
}
#access a {
color: #FFFFFF;
display: block;
height: 27px;
margin-left:10px;
padding-right: 10px;
padding-top:4px;
padding-right:25px;
text-decoration: none;
font-weight:normal !important;
background:url(images/mantra_menu.png) top right no-repeat;
position:relative;
right:-10px;
z-index: 102;
white-space:nowrap;
}
#access .menu-header li:hover,
div.menu li:hover, #access a:hover {
color:#0C85CD ;
}
#access ul ul {
display: none;
position: absolute;
top: 29px;
right: 0px important;
float: right;
z-index: 104;
background:url(images/mantra_menu_down.png) 0px 0px no-repeat;
padding:12px 0px 0px;
/*border-bottom:1px solid #CCC;*/
margin-top:-30px;
}
#access ul ul li {
display:block !important;
background:#FFF !important;
/* border-left:1px solid #CCC;
border-right:1px solid #CCC;*/
margin-left:0 !important;
margin-right:0px !important;
/*padding-left:10px;
padding-right:10px;*/ /* disabled for submenu width fix */
padding-top:6px;
z-index: 105;
}
#access ul { }
#access ul li { }
#access ul li ul {
display: none; /* submenu width fix */ }
#access ul ul li { /* level 2 */
border: 0;
width: 100%; /* submenu width fix */
border-left: 1px solid #EEE;
border-right: 1px solid #EEE;
border-bottom: 1px solid #EEE;
white-space: pre;
}
#access ul ul ul li { /* level 3 */
border: 0;
/* width: 100%;*/
width: auto;
display: block;
float: none;
border-top: 1px solid #EEE;
border-right: 1px solid #EEE;
border-bottom: 1px solid #EEE;
white-space: pre; /* submenu width fix */
z-index: 106;}
#access ul ul a { display: block; padding: 3px 20px 0 10px !important;
/* submenu width fix */ }
#access ul ul a, #access ul ul ul a {
margin:0 !important;/*padding:0 !important;*/
left:0 !important;
color:#5F5B5B;
border-bottom:none;
background:none !important;
}
#access ul ul li:hover, #access ul ul ul li:hover {
background:#FCFCFC !important;
}
#access ul ul ul {
left: 100%;
top: 0;
background:url(images/mantra_menu_right.png) 0px 0px no-repeat;
padding:0px 0px 0px 12px;
z-index: 107;
/*border:1px solid #CCC;*/
}
#access li:hover > a {
color:#0E85CD ;
}
#access ul ul :hover > a {
color:#0E85CD;
}
#access ul li:hover > ul {
display: block;
z-index: 108;
}
#access ul li.current_page_item > a,
#access ul li.current-menu-item > a{
color: #000 !important;
background:url(images/mantra_menu_current.png) top right no-repeat;
}
#access ul ul li.current_page_item ,
#access ul ul li.current-menu-ancestor,
#access ul ul li.current-menu-item ,
#access ul ul li.current-menu-parent {
color: #000 !important;
background:#FFF !important;
}
* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
color: #5F5B5B ;
background:url(images/mantra_menu_current.png) top right no-repeat;
}

I made the following changes:
#menu-main-navigational {
position:relative;
}
#access .menu-header ul {
position:absolute;
}
and it worked for me

Give the .sub-menu element a position of absolute instead of relative. The relative causes it to force its parent element to expand. You will also need to give it a fixed width as it will no longer resize to its parent. And edit out any rules that override that property on the element.

Related

Responsive CSS issues on my shop

I have some responsive issues on my prestashop site on the top menu block.
Can you please help me solve them?
On media width 500px:
- The height of the categories on the top menu are too high, the "Novedades" item cannot be seen.
On media width 600px:
- The menu subcategories are dropped down automatically by themselves.
On media width 1000px:
- The cloud on "Novedades" item is not set correctly must be a little higher.
Here is the code
/*** ESSENTIAL STYLES ***/
.sf-contener {
clear: both;
}
.sf-right {
margin-right: 14px;
float: right;
width: 7px;
}
.sf-menu, .sf-menu * {
margin: 0;
padding: 0px 0px 0px 0px;
list-style: none;
}
.sf-menu {
margin: 10px 0;
padding:0px 0px 0px 0px;
width:980px;/* 980 */
background: #383838;
/* #media (max-width: 450px) {
.sf-menu {
display: none; } */
}
.sf-menu ul {
position: absolute;
top: -999em;
width: 10em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
width: 100%;
}
.sf-menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
float: left;
position: relative;
top: 0;
/*border-right: 1px solid #777;*/
}
.sf-menu a {
display: block;
position: relative;
color:#fff;
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
left: 0;
/*padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;*/
top: 35px; /* match top ul list item height */
z-index: 99;
width:auto;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
top: -999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
left: 200px; /* match ul width */
top: 0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
left: 200px; /* match ul width */
top: 0;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
left: 200px; /* match ul width */
top: 0;
}
/*** DEMO SKIN ***/
.cat-title {
display: none;
}
.sf-menu {
float: left;
margin-bottom: -2em;
width: 100%;
height: 75px;
background: url('http://www.dulcewashitape.com/themes/dulcewashitape/img/cabecera.png') repeat left center;
}
.sf-menu a {
position: relative;
top: 20px;
display:block;
margin-right:2px;
padding: 0 22px 0 20px;
line-height:35px;
border: 10;
text-decoration:none;
text-transform: uppercase;
font-family:Handlee;
font-size: 18px;
font-weight: bold;
}
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color: #916e6e;
white-space:nowrap;
}
.sf-menu li ul {
border:1px solid #f1b6b1; box-shadow:2px 2px 4px rgba(0,0,0,0.25);
width:500px;
padding: 0;
margin: 23px 0px 0px 0px;
top:0;
background: white;
}
.sf-menu li li {
background: white;
position: relative;
top: 0;
height:35px;
line-height:35px;
padding: 0;
margin: 0px 0px 0px 0px;
}
.sf-menu li li a {
font-size: 16px;
text-transform: capitalize;
top:0;
}
.sf-menu li li li {
background: white;
width:140px;
}
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
font-weight: bold;
color: white;
background: url('http://www.dulcewashitape.com/themes/dulcewashitape/img/boton-b.png') no-repeat center 0px;
}
.sf-menu ul li:hover, .sf-menu ul li.sfHover,
.sf-menu ul li a:focus, .sf-menu ul li a:hover, .sf-menu ul li a:active {
background: #eecfd0; //#4e4e4e;
outline: 0;
}
/*** arrows **/
.sf-menu a.sf-with-ul {
padding-right: 2.25em;
min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */
padding-top: 20px;
margin-top: -20px;
}
.sf-sub-indicator {
position: absolute;
display: block;
right: 10px;
top: 1.05em; /* IE6 only */
width: 10px;
height: 35px;
text-indent: -999em;
overflow: hidden;
background: url('../img/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator { /* give all except IE6 the correct values */
top: 11px;
background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
background-position: -10px -100px; /* arrow hovers for modern browsers*/
}
/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position: -10px 0; }
.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus > .sf-sub-indicator,
.sf-menu ul a:hover > .sf-sub-indicator,
.sf-menu ul a:active > .sf-sub-indicator,
.sf-menu ul li:hover > a > .sf-sub-indicator,
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
background-position: -10px 0; /* arrow hovers for modern browsers*/
}
/*** shadows for all but IE6 ***/
.sf-shadow ul {
background: url('../img/shadow.png') no-repeat bottom right;
padding: 0 8px 9px 0;
-moz-border-bottom-left-radius: 17px;
-moz-border-top-right-radius: 17px;
-webkit-border-top-right-radius: 17px;
-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
background: transparent;
}
li.sf-search {
background: inherit;
float: right;
line-height: 25px;
background:transparent;
}
li.sf-search input {
-moz-border-radius: 0 5px 5px 0;
padding: 5px 0;
position: relative;
top: 1px;
padding-left: 30px;
margin: 18px 6px 0 0;
background: #fff url('../../../../img/search-zoom3.png') no-repeat left center;
border:1px solid #777;
}
/* hack IE7 */
.sf-menu a, .sf-menu a:visited {height:34px !IE;}
.sf-menu li li {
width:200px;
background:#726f72 !IE;
}
#block_top_menu .category-thumbnail {
display:none;
clear: both;
width: 100%;
float: none; }
#block_top_menu .category-thumbnail div {
float: left;
width: 33.33333%; }
#block_top_menu .category-thumbnail div img {
max-width: 100%; }
#block_top_menu li.category-thumbnail {
padding-right: 0; }
/* Mobile Item */
.sf-menu-phone-item { display:none; }
#sf-menu-phone-trigger { display:none; position:absolute; top:7px; right:0; background:url('http://www.dulcewashitape.com/themes/dulcewashitape/img/icon-mobile-nav.png') top right no-repeat #29addd; width:50px; height:50px; text-indent:-9999px; border-radius:3px;
-webkit-transition: all 0.5s ease 0s;
-moz-transition: all 0.5s ease 0s;
-o-transition: all 0.5s ease 0s;
transition: all 0.5s ease 0s; }
#sf-menu-phone-trigger:hover { background-color:#333; }
#sf-menu-phone-trigger.active { background-position:bottom right; }
#media only screen and (max-width: 999px) {
.sf-menu a, .sf-menu a:visited {font-size:13px;}
}
/* Tablet Only Queries */
#media only screen and (min-width: 531px) and (max-width: 786px) {
.sf-menu a, .sf-menu a:visited {font-size:12px;}
}
/* Phone Only Queries */
#media only screen and (max-width: 530px) {
#sf-menu-header {height:auto; }
#sf-menu-top-nav {margin-left:-2%; margin-right:-2%;}
/*.sf-menu {display:none; } */
.sf-menu {width:100%; height:auto; margin:10px 0 0 0; position:static !important}
.sf-menu li {width:100%; background:#f4f4f4; border-top:1px solid #fff !important; border-bottom:1px solid #999 !important; -webkit-border-radius:0; border-radius:0; }
.sf-menu li:hover {background:#de8686;}
.sf-menu li ul {width:100%; position:static !important; background:#ccc;}
.sf-menu li li {width:100% !important; background:#ccc; }
/*.sf-menu li li li {display:none !important;}*/
.sf-menu-phone-item { display:block; }
#sf-menu-phone-trigger { display:block; }
.sf-search {padding:10px;}
#searchbox {margin-left:15px;}
#searchbox input[type="text"] {width:80%;}
#searchbox input[type="text"]:focus, #searchbox input[type="text"]:hover {width:80%;}
#searchbox .button {width:10%;}
#header_logo { padding-right:50px; text-align:left !important;}
}
And the site is : [www.dulcewashitape.com][1]
Thank you very much I really appreciate your help
On media width 1000px: The "Washi Tape" text is reading the CSS for the a.sf-with-ul class whereas the "Novedades" is executing the CSS for a, and they have differing CSS values.
Take the CSS in a.sf-with-ul and apply it to the a to align your clouds:
ul.sf-menu li a {
padding-right: 2.25em;
min-width: 1px;
padding-top: 20px;
margin-top: -20px;
}
On media width 500px: You have a top:20px; that pushes your text down assigned inside .sf-menu a. Removing it is not an option since it causes misalignment at higher screen widths to your menu. Given this constraint, you can create a special rule using the following to only apply your desired top:5px; if the screen width is less than or equal to 500px
#media screen (max-width: 500px) {
.sf-menu a{
top:5px;
}
}
Unfortunately I do now know how to fix the automatically dropping down menu, goodluck!

How to stick a background behind the navbar?

I have a problem here.
I'm using wordpress and I was confused.
How to stick background behind the nav bar?.
I activated LowerMedia Sticky.js menu's plugin, then I want to change my navbar background color. I try to add a background: #000; in #navigation. It's look okay, but when I scroll down, the navigation background is not move. There's only the navigation text that moved. I try to move background: #000; to #navigation .sf-menu a but the background is only appear around the text, even it move with the text when I scroll down. I don't know what to do now. Please help me. Thanks before.
This is my site : vitraprawira.net
This is my final navbar css code:
/* Main Navigation
================================================== */
/*hide responsive nav*/
#top-bar .selector, #navigation .selector { display: none; }
/*core*/
.sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; }
.sf-menu { line-height: 1.0 }
.sf-menu ul { position: absolute; top: -999em; width: 180px; }
.sf-menu ul li { width: 100% }
.sf-menu li:hover { visibility: inherit }
.sf-menu li { float: left; position: relative; }
.sf-menu a { display: block; position: relative; }
.sf-menu li:hover ul, .sf-menu li.sfHover ul { left: 0px; top: 30px; z-index: 99; }
ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top: -999em }
ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 180px; top: 1px; }
/*styling*/
#navigation-wrap { position: relative; display: block; }
#navigation { margin-left: 170px; margin-right: auto; position: relative; height: 55px; transparent: none; }
#navigation .sf-menu > li:hover > ul, .sf-menu li.sfHover > ul { top: 50px }
#navigation ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul, ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 200px; top: 0; }
#navigation .sf-menu a { font-size: 1.000em; height: 55px; line-height: 55px; color: #fff; background: #000 url("images/vintage.png"); }
#navigation .sf-menu > li > a { border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; }
#navigation .sf-menu li { float: left; position: relative; }
#navigation .sf-menu > li { background: url("images/dash.png") right center no-repeat; margin-right: 20px; padding-right: 20px; }
#navigation .sf-menu > li:last-child { margin: 0; padding: 0; }
#navigation .sf-menu > li > a:hover { color: #fff }
#navigation .sf-menu > .current-menu-item > a { color: #7094DB }
#navigation .sf-menu > li.sfHover > a { color: #fff }
/*drop-down styles*/
#navigation .sf-menu ul { position: absolute; nowhitespace: afterproperty; top: -999em; width: 200px; z-index: 9999; left: 0; border: 1px solid #ddd; box-shadow: 0 0 8px rgba(0,0,0,0.08); }
#navigation .sf-menu ul > li:last-child { -webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -moz-border-radius-bottomleft: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; }
#navigation .sf-menu ul li { background: #000; border-bottom: 1px solid rgba(0,0,0,0.05); }
#navigation .sf-menu ul li:first-child { border-top: 0 }
#navigation .sf-menu ul li:last-child { border-bottom: 0 }
#navigation .sf-menu ul a { display: block; padding: 10px; color: #fff; height: auto; margin: 0px; border: 0px; line-height: 1.8em; font-size: 0.923em; text-shadow: none; }
#navigation .sf-menu ul li > a:hover { color: #7094DB; background: #2D3B58; }
If you're wanting the color/image to appear behind the entire menu block, then you're localizing the background too close to the anchor element.
Just do this: #navigation {background: #ccc;} or whatever color you want.

CSS for dropdown menus both centered and to the left

I recently took over a friend's site and have been having a fun (read: not fun) time dealing with the theme that was built for it. My current issue are the menus. The first tier of the dropdown menu is centered, which is fine, but the second is pushed to the right, which is a problem with this theme. Since the menu is easier to fix, that's what I am trying to attack, but I CANNOT figure out what to change to push the menu to the left.
Here is my current CSS:
.menu-maine-menue-container {
width: 990px;
margin-left: auto;
margin-right: auto;
font-weight: bold;
}
.menu-maine-menue-container ul {
clear:left;
float:left;
list-style:none !important;
margin:0;
padding: 8px 0px 0px 0px;
position:relative;
left:50%;
text-align:center;
}
.menu-maine-menue-container ul li {
list-style:none !important;
position:relative;
right:50%;
padding: 0px 22px 8px 22px;
float: left;
font-weight: normal;
color: #fbfbd5;
text-shadow: rgb(0, 0, 0) 2px 2px 0px;
font-family: 'Sohoma';
font-size: 20px;
text-transform: uppercase;
letter-spacing: .05em;
}
.menu-maine-menue-container ul li:first-child {
padding-left: 0px ;
}
.menu-maine-menue-container ul li a {
color: #fbfbd5;
}
.menu-maine-menue-container ul li a:hover {
color: #d5f4ed !important;
text-decoration: none;
text-shadow: rgb(0, 0, 0) 2px 2px 3px;
}
.current-menu-item a, .menu-maine-menue-container ul li a:active {
color: #d5f4ed !important;
}
.menu-maine-menue-container ul li a:active {
text-shadow: none !important;
}
/* SUB MARINE MENUZ */
.menu-maine-menue-container ul ul {
list-style: none;
margin:0; /* Appear just below the hovering list */
padding:0;
width:220px; /* specify the width. */
position:absolute; /* needed */
z-index:500; /* specify the order */
}
.menu-maine-menue-container ul li ul {
top:27px; /* Positioning:Calc with top level horz list height */
}
.menu-maine-menue-container ul ul ul {
top:0;
left:100%; /* Position the sub menus to left. */
}
.menu-maine-menue-container ul li ul li {
float:left;
padding: 12px 8px 9px 8px !important;
margin-left: auto; margin-right: auto;
background: #eb5a4e;
width: 200px;
text-align: center !important;
}
.menu-maine-menue-container ul li ul li:last-child {
padding-bottom: 15px;
}
.menu-maine-menue-container ul li li a {
font-size: 17px;
line-height: 19px;
text-align: center !important;
width: 200px;
}
/* Drop Down! */
/* Hide all the dropdowns (submenus) */
.menu-maine-menue-container ul ul,
.menu-maine-menue-container ul li:hover ul ul,
.menu-maine-menue-container ul ul li:hover ul ul
{ display: none;}
/* Display the submenus only when li are hovered */
.menu-maine-menue-container ul li:hover ul,
.menu-maine-menue-container ul ul li:hover ul ,
.menu-maine-menue-container ul ul li ul li:hover ul
{ display: block;}
The site is freejeremy.net and the area of issue is "Support" and "Prisoner Soldarity."
The rule you need to change is .menu-maine-menue-container ul ul ul which has left:100%
Change the 100% to -50% (or something similar) and you should be fine..

Wordpress Menu UL height

I have some pretty good experince coding my own UL's but I'm relatively new to wordpress. Confusing to me to work backwards especially when I can't see the html. Anyway I'm using the cufon WP plugin to change the font in the menu. but....with the size I want the font, it shrinks the list item as well as the a:hover. There is somehting in the padding i presume, but I can't find it. you can see what I mean here http://www.thedailyminx.com
here is the menu's css
#navbar {
float: left;
display: block;
background: #bfbcc6;
color: #000000;
width: 978px;
height: 30px;
font-size: 25px;
font-family: 'jc-hand';
margin: 15px auto 15px;
padding: 0px 0px 0px 0px;
border: 1px solid #DDDDDD;
position: relative;
z-index: 9;
}
/*** ESSENTIAL STYLES ***/
.menu, .menu * {
margin: 0;
padding: 0;
list-style: none;
}
.menu {
line-height: 1.0;
}
.menu ul {
margin: 0px;
padding: 0px;
}
.menu ul ul, ul.menu ul {
position: absolute;
top: -9999px;
width: 160px; /* left offset of submenus need to match (see below) */
}
.menu ul li ul li, ul.menu ul li {
width: 100%;
margin: 0px 0px 0px 0px;
}
.menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.menu li {
float: left;
display: inline-block;
position: relative;
}
.menu a {
display: inline-block;
position: relative;
}
.menu li:hover ul,
.menu li.sfHover ul {
left: 0;
top: 30px; /* match top ul list item height */
z-index: 99;
}
ul.menu li:hover li ul,
ul.menu li.sfHover li ul {
top: -9999px;
}
ul.menu li li:hover ul,
ul.menu li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
ul.menu li li:hover li ul,
ul.menu li li.sfHover li ul {
top: -9999px;
}
ul.menu li li li:hover ul,
ul.menu li li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
/*** SKIN ***/
.menu .current_page_item a,
.menu .current_page_ancestor a,
.menu .current-menu-item a,
.menu .current-cat a {
background: #333333;
color: #FFFFFF;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
}
.menu li .current_page_item a, .menu li .current_page_item a:hover,
.menu li .current-menu-item a, .menu li .current-menu-item a:hover,
.menu li .current-cat a, .menu li .current-cat a:hover {
background: #333333 !important;
color: #FFFFFF !important;
border-left: none;
border-right: none;
}
.menu {
float: left;
margin-bottom: 0;
}
.menu a {
color: #000000;
background: none;
margin: 0px 0px 0px 0px;
padding: 0px 12px 0px 12px;
text-decoration: none;
letter-spacing: 0.1px;
line-height: 30px;
border-right: 1px solid #DDDDDD;
border-left: 1px solid #FFFFFF;
}
.menu li li a {
display: block;
background: #F5F5F5 !important;
color: #000000 !important;
margin: 0px 0px 0px 0px;
padding: 0px 10px 0px 10px;
font-size: 25px;
line-height: 30px;
text-decoration: none;
text-transform: none;
text-shadow: none;
letter-spacing: 0px;
border-right: none !important;
border-left: none !important;
}
.menu li, .menu li li, .menu li li li {
background: none;
margin: 0px;
padding: 0px;
}
.menu li:hover, .menu li.sfHover {
margin: 0px;
padding: 0px;
}
.menu a:focus, .menu a:hover, .menu a:active {
background: #333333;
color: #FFFFFF;
border-right: 1px solid #333333;
border-left: 1px solid #333333;
outline: 0;
}
.menu li li:hover, .menu li li.sfHover {
margin: 0px;
padding: 0px;
}
.menu li li a:focus, .menu li li a:hover, .menu li li a:active {
background: #EEEEEE !important;
color: #333333 !important;
border: none;
outline: 0;
}
can anyone help me out?
Thanks
Greg
ditch the inline height styling of cufon and set it in your stylesheet to 30px

Centering block menu `<li>` elements in a `<div>`

This should be an easy one - I'm just missing something simple, I'm sure.
I have a header and want a nested, centered horizontal menu.
#header {
background:url(images/headers/header.gif);
margin: 0 auto;
height: 207px;
width: 100%;
}
/* =Menu
-------------------------------------------------------------- */
#access {
background: transparent;
display: block;
text-align: center;
float: left;
margin: 150px auto 0;
width: 940px;
}
#access .menu-header,
div.menu {
font-size: 13px;
margin-left: 120px;
width: 766px;
}
#access .menu-header ul,
div.menu ul {
list-style: none;
margin: 0 auto;
}
#access .menu-header li,
div.menu li {
background-color: #444;
margin: 0 auto;
float: left;
text-align: center;
width: 110px;
position: relative;
}
#access a {
color: #aaa;
display: block;
line-height: 38px;
padding: 0 10px;
text-decoration: none;
}
#access ul ul {
box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
display: none;
position: absolute;
top: 38px;
left: 0;
float: left;
width: 180px;
z-index: 99999;
}
#access ul ul li {
min-width: 180px;
}
#access ul ul ul {
left: 100%;
top: 0;
}
#access ul ul a {
background: #333;
line-height: 1em;
padding: 10px;
width: 160px;
height: auto;
}
#access li:hover > a,
#access ul ul :hover > a {
background: #444;
color: #fff;
}
#access ul li:hover > ul {
display: block;
}
#access ul li.current_page_item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-parent > a {
color: #fff;
}
* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
color: #fff;
}
site: http://74.86.183.200/~riaharb/stage/
Thanks in advance!
That's not hugely tricky, this should work:
#parent_ul {
width: 80%;
text-align: center;
margin: 0 auto;
}
#parent_ul > li {
display: inline; /* or inline-block */
}

Resources