Recall & Review
beginner
What class in Bootstrap controls the size of a modal?Bootstrap uses classes like
modal-sm, modal-lg, and modal-xl on the .modal-dialog element to control modal sizes.Click to reveal answer
beginner
How do you center a Bootstrap modal vertically?
Add the class
modal-dialog-centered to the .modal-dialog element to vertically center the modal in the viewport.Click to reveal answer
intermediate
Which Bootstrap class makes a modal full screen on all devices?Use the class
modal-fullscreen on the .modal-dialog element to make the modal cover the entire screen.Click to reveal answer
beginner
What is the default horizontal alignment of a Bootstrap modal?
By default, Bootstrap modals are horizontally centered in the viewport without extra classes.
Click to reveal answer
intermediate
How can you make a modal scrollable if its content is too tall?
Add the class
modal-dialog-scrollable to the .modal-dialog element to enable vertical scrolling inside the modal body.Click to reveal answer
Which class would you add to make a Bootstrap modal larger than the default size?
✗ Incorrect
The class
modal-lg makes the modal larger than the default size.How do you vertically center a Bootstrap modal?
✗ Incorrect
The class
modal-dialog-centered vertically centers the modal.Which class makes a Bootstrap modal take up the entire screen?
✗ Incorrect
modal-fullscreen makes the modal cover the full screen.If modal content is too tall, which class helps to scroll inside the modal?
✗ Incorrect
Use
modal-dialog-scrollable to enable scrolling inside the modal.What is the default horizontal alignment of Bootstrap modals?
✗ Incorrect
Bootstrap modals are horizontally centered by default.
Explain how to change the size of a Bootstrap modal and give examples of classes used.
Think about classes added to the modal dialog to control width.
You got /5 concepts.
Describe how to position a Bootstrap modal vertically centered and how to handle tall content inside it.
Consider classes that affect vertical alignment and scrolling.
You got /4 concepts.