How to Increase Modal Width in Bootstrap 5, 4, and 3

Last Updated on January 9, 2025 by Roshan Parihar

Learn how to increase modal width in Bootstrap 5 and other versions. You have to just add some class or CSS to customize the modal sizes. Let’s find out with the examples given below.

Increase Modal Width in Bootstrap 5

To increase modal with in Bootstrap 5, You have to add the class .modal-sm for small, .modal-lg for large, .modal-xl for extra-large, and .modal-fullscreen for fullscreen to the div containing class .modal-dialog.

Test it Live

Output

Increase Modal Width in Bootstrap 5

When you click the buttons given above, you will get the live preview where you can check the different width of modal in Bootstrap 5.

Change or Increase Modal Width in Bootstrap 4

Bootstrap 4 comes with classes .modal-sm for small, .modal-lg for large, .modal-xl for extra-large. You have to add the class to the div having class .modal-dialog.

Bootstrap 4 does not have any class for making the modal fullscreen. However, you can add some CSS as given below to make the modal fullscreen.

Test it Live

Output

Change or Increase Modal Width in Bootstrap 4

You can click the above button to see the live preview of different modal width.

Custimize Size in Bootstrap 3

There are only two classes present in Bootstrap 3 to customize the modal size. These classes are .modal-sm for small modal and .modal-lg for large modal.

However, there are no classes present for extra large and fullscreen modal size. But, you can add some CSS as given below to make the modal size extra large and fullscreeen.

Test it Live

Output

Customize or Increase Modal Width in Bootstrap 3

To check the modal sizes in Bootstrap 3, you can click the buttons given above to see the different modal sizes.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.