Increase bootstrap dropdown menu width

前端 未结 7 799
悲哀的现实
悲哀的现实 2020-12-30 19:09

wondering if anyone has any tips on how to increase the dropdown width?

I have a row containing two columns with a a bit of javascript that slides the dropdown up an

相关标签:
7条回答
  • Usually we have the need to control the width of the dropdown menu; specially that's essential when the dropdown menu holds a form, e.g. login form --- then the dropdown menu and its items should be wide enough for ease of inputing username/email and password.

    Besides, when the screen is smaller than 768px or when the window (containing the dropdown menu) is zoomed down to smaller than 768px, Bootstrap 3 responsively scales the dropdown menu to the whole width of the screen/window. We need to keep this reponsive action.

    Hence, the following css class could do that:

    @media (min-width: 768px) {
        .dropdown-menu {
            width: 300px !important;  /* change the number to whatever that you need */
        }
    }
    

    (I had used it in my web app.)

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