z-index issue with twitter bootstrap dropdown menu

后端 未结 12 2269
耶瑟儿~
耶瑟儿~ 2020-12-05 09:24

I\'m using twitter bootstrap dropdown menu in a fixed navbar at the top of my page.

It all works fine but am having issues with the drop down menu items showing behi

相关标签:
12条回答
  • 2020-12-05 09:30

    Solved this issue by removing transform: translateY(50%); property.

    0 讨论(0)
  • 2020-12-05 09:31

    This will fix it

    .navbar .nav > li {
    z-index: 10000;
    }
    
    0 讨论(0)
  • 2020-12-05 09:33

    Just give

    position: relative; 
    z-index: 999;
    

    to the navbar

    0 讨论(0)
  • 2020-12-05 09:41

    Still the issue with Bootstrap v3, navbar and dropdown have same z-index ;-( I just increased .dropdown-menu z-index to 1001.

    0 讨论(0)
  • 2020-12-05 09:42

    I had the same problem and after reading this topic, I've solved adding this to my CSS:

    .navbar-fixed-top {
        z-index: 10000;
    }
    

    because in my case, I'm using the fixed top menu.

    0 讨论(0)
  • 2020-12-05 09:43

    Ran into the same bug here. This worked for me.

    .navbar {
        position: static;
    }
    

    By setting the position to static, it means the navbar will fall into the flow of the document as it normally would.

    0 讨论(0)
提交回复
热议问题