I have been struggling to correctly adjust the CSS properties in order to make a ng-bootstrap carousel image fit into a specific space (div) within a custom ng-bootstrap modal. Take a look at this modified StackBlitz code.
In the provided example, the image is extending beyond the designated space (height) of the modal and the col-8
where it is positioned.
How can I ensure that the carousel adjusts to the size of its parent col-8
so that it does not overlap with the modal's dimensions?
UPDATE
For those who are unable to identify the issue, you can view the live application here
Despite numerous attempts, I have only managed to reach this point. The carousel-inner
and its child elements are not adapting to the dimensions of their parent div, which is ngb-carousel.carousel-modal
. The image below illustrates this issue
https://i.sstatic.net/x8ZN7.gif
As depicted in the image above, I am unable to align carousel-inner
with the size of its parent ngb-carousel.carousel-modal
, which already conforms to the modal's height. Despite setting them to max-height:100%
for responsiveness, the carousel always exceeds the height of the carousel-modal
.