Modal plugin of Bootstrap 2 is not displayed by the center

后端 未结 5 628
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 11:10

I use bootstrap modal plugin. But modal dialog is not shown in center. Why? my mistake?

http://dl.dropbox.com/u/573972/stackoverflow/bootstrap/modal.html



        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-04 12:01

    if your twitter bootstrap modal dialog is not centered horizontally you can fix this via css.

    just give the modal dialog a negative left margin that is half it's width like e.g. so:

     .modalDialogBlabla {
         margin: 0 0 0 -250px;
         width: 500px;
      }
    

提交回复
热议问题