Fixed width buttons with Bootstrap

后端 未结 12 554
臣服心动
臣服心动 2021-01-29 18:36

Does Bootstrap support fixed width buttons? Currently if I have 2 buttons, \"Save\" and \"Download\", the button size changes based on content.

Also what is the right wa

12条回答
  •  悲&欢浪女
    2021-01-29 19:09

    For your buttons, you can create another CSS selector for those special classes of buttons with a specified min-width and max-width. So if your button is

    
    

    In your Bootstrap CSS file you can create something like

    .save_button {
        min-width: 80px;
        max-width: 80px;
    }
    

    This way it should always stay 80px even if you have a responsive design.

    As far as the right way of extending Bootstrap goes, Take a look at this thread:

    Extending Bootstrap

提交回复
热议问题