How can I change the default width of a Twitter Bootstrap modal box?

后端 未结 30 2743
醉酒成梦
醉酒成梦 2020-11-27 08:38

I tried the following:

   
30条回答
  •  忘掉有多难
    2020-11-27 09:31

    For Bootstrap 3 here's how to do it.

    Add a modal-wide style to your HTML markup (as adapted from the example in the Bootstrap 3 docs)

    
    

    and add the following CSS

    .modal-wide .modal-dialog {
      width: 80%; /* or whatever you wish */
    }
    

    There is no need to override margin-left in Bootstrap 3 to get this to be centered now.

提交回复
热议问题