Twitter Bootstrap Accordion and button dropdown overflow issue

前端 未结 10 1793
一个人的身影
一个人的身影 2021-02-12 12:25

I\'m using Bootstrap for a section of my website. I mix accordion with a dropdown button. The problem comes when the button is on the bottom, the drop-down is hidden since the .

10条回答
  •  我寻月下人不归
    2021-02-12 13:02

    So here's a partial solution. This does make the dropdown go upward on purpose. Making it a dropup.

    Here's the CSS rule to add:

    .btn-group.open-upward.open ul.dropdown-menu {
        top: auto;
        bottom: 100%;
    }
    

    So the class to add is open-upward

    Action

    I say partial because once you add the class, it will go upward. You'd have to remove the class to reverse it back to the default behavior.

提交回复
热议问题