Twitter Bootstrap Cheat Sheet

How to adjust the default width of the modal dialog?

I think, by default, the width of the modal dialog is 50% of width of the screen / viewport. This may or may not work for your situation. I need to change the width of my modal dialog (for a specific circumstance) to 80% of the width of the screen / viewport. However, when I did this, the part of the modal dialog is hidden. To get it right:

width: 80%;
margin-left: -40%;

or with specific width (in pixel):

width: 600px;
margin-left: -300px;

Thanks to http://stackoverflow.com/questions/10169432/how-can-i-change-the-default-width-of-a-twitter-bootstrap-modal-box/16090509#16090509

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License