New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Responsive image height overflow #34885
Comments
The following seems to fix it:
|
Implementing something like that might not be the best solution for everyone, so we don't use it by default. Definitely an add-on individual developers and designers should choose to use :). |
Seems bad that responsive images are broken by default... |
They're not broken by default, they specifically are designed to keep the aspect ratio of an image while preventing it from being too wide. There's no assumption of scaling an image based on a fixed height container. Changing to include additionally properties would potentially break images for everyone else. |
Then docs should be changed to reflect this. From docs: From the above statement I understand that a responsive image is expected to not have a height greater than it's parent ( Docs should be changed to reflect that only width is taken into account. |
While using
.img-fluid
, if the image height is larger than the container's , then the image can overflow:Codepen: https://codepen.io/cdalxndr/pen/gORMGPE
Also, it would be nice for the docs should include samples for all types of image sizes:
Bootstrap 5.1.0
OS: Win10 19043
Browser: Firefox 90.0
The text was updated successfully, but these errors were encountered: