Exploring the functionality of the bootstrap-5
grid system within a modal
popup has raised a puzzling issue. To investigate further, I began by incorporating the grid example into the main modal template sourced from https://getbootstrap.com/docs/5.0/components/modal/, specifically within the modal-body
:
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4 ms-auto">.col-md-4 .ms-auto</div>
</div>
....
Upon implementation, it became evident that the grid structure was not being maintained as expected. The question arises: why is this happening?
For an interactive demonstration and to explore the code further, visit https://jsfiddle.net/3041fLwk/.