Vertically centering Bootstrap modal window
I would like to center my modal on the viewport (middle) I tried to add some css properties .modal { position: fixed; top:50%; left:50%; } I’m using this example http://jsfiddle.net/rniemeyer/Wjjnd/ I tried $(“#MyModal”).modal(‘show’).css( { ‘margin-top’: function () { return -($(this).height() / 2); }, ‘margin-left’: function () { return -($(this).width() / 2); } }) 31 Answers … Read more