Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

cant center submenu for all browsers WordPress

  • SOLVED

Hi! I use wordpress with headwaythemes.

Somehow I dont get thew submenu centered for firefox. its good in safari and chrome. However if I style it right for firefox it is wrong for safari & chrome (all on mac).

Maybe I do it wrong at all. I use this css:

nav#block-42.block-type-navigation ul.sub-menu a {

margin-left: -38px !important;
left:50% !important;

}




http://alpha.restaurant-richard.de/schaumweine/

you need a password to see: noellenheidt666

Answers (2)

2012-09-17

Jatin Soni answers:

CSS wrote in very bad way. Need to refine..however placing some class here you can workout

nav#block-42.block-type-navigation ul.menu li {
text-align: center !important;
position:relative;
}
.block-type-navigation ul.menu li:hover > ul.sub-menu, .block-type-navigation ul.menu li.sfHover > ul.sub-menu{
width:120px;
left:50%;
}

Remove min-width and max-width property or use > to define property for particular element which will avoid affecting child elements.

Something like
nav#block > ul.menu > li > a{
here write.......
}

this won't affect to submenu anchor tag which is overriding in your case.


klaus dyba comments:

Hi Thanks for the help. Yeah I am a newbie... need to learn a lot!!

Can you explain a little bit more what to do with "here write..." in

Something like
nav#block > ul.menu > li > a{
here write.......
}



I use min-width and max-width property for a responsive design. Do you mean this?

Sorry for not having a clue! :-(

2012-09-17

Arnav Joy answers:

try adding following lines to your stylesheet,

.block-type-navigation ul.menu li:hover > ul.sub-menu, .block-type-navigation ul.menu li.sfHover > ul.sub-menu {
display: block !important;
left: auto !important;
overflow: hidden !important;
}



klaus dyba comments:

It worked with

.block-type-navigation ul.menu li:hover > ul.sub-menu, .block-type-navigation ul.menu li.sfHover > ul.sub-menu {

display: block !important;

left: auto !important;

overflow: hidden !important;
margin-left:-38px;
}


Thanks!!

This is my first question. So what do I have to do now? Who gets my money? Whats up with up/down vote??


Arnav Joy comments:

Hi ,

To vote you must visit your question , and then click on "Vote to Award Prize" link then choose the amount and click on Vote