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

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

I tried the following:

   
30条回答
  •  余生分开走
    2020-11-27 09:27

    Solution was taken from this page

    $('#feedback-modal').modal({
        backdrop: true,
        keyboard: true
    }).css({
        width: 'auto',
        'margin-left': function () {
            return -($(this).width() / 2);
        }
    });
    

提交回复
热议问题