简体   繁体   中英

CSS Sub-menu positioning works in Chrome & Safari, but not IE and Firefox

I'm currently building a site for a gaming community, called http://www.quad-gaming.com/ .

Everything is running smooth except the dropdown menu under "Login" at the right side of the navigation bar. It works well in Chrome and Safari, but in IE and Firefox, it floats to the left.

What am I doing wrong?

Indeed a bit strange.

If you specify the ul element to have a left value to zero, it works fine:

nav ul li ul {
  left: 0;
}

Can't try it on IE because I am on a Mac. Hope it works also there.

Try this

.dropdown ul {
    left: 0;
}

Tested and works on Win7 on IE10, IE8, FF20 and Chrome 26

I've used

nav ul li ul {
    position:absolute;
    left:0px; /* Adding this to fix left position*/
    visibility: hidden;
}    

And It works in Firefox.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM