Bootstrap: IE11: Figure with .img-fluid is not resized

Created on 9 Jan 2018  路  4Comments  路  Source: twbs/bootstrap

The fluid image in a figure container is not resized at all making it overflow the content area.

On MacOS with Safari 11.0.2 it looks fine:
macos-safari

On Win 7 with Internet Explorer 11 .0.9600.18015 it looks like this:
bildschirmfoto 2018-01-09 um 14 36 47

Does seem to be somewhat related to display: inline-block on figure as deactivating that property (falling back to 'display: block' makes it look fine on IE11:
win7-ie11-display

There have been related issues (#20970, #21360, #21886, #21888) describing this behavior for older versions of Firefox or which are closed to inactivity. There doesn't seem to be a fix for IE11 (which is a supported version I suppose).

I created a minimal example on JS Bin.

browser bug css has-pr v4

Most helpful comment

Adding width: 100% to .img-fluid fixes this issue in IE11

All 4 comments

Adding width: 100% to .img-fluid fixes this issue in IE11

easy pick

.img-responsive has the max-width:100%; display:block; and height:auto; styling. I wonder if the 'Reponsive Images' section on https://getbootstrap.com/docs/4.0/content/images/ should be updated from .img-fluid to .img-responsive?

Fixed in #30809.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamov picture kamov  路  3Comments

leomao10 picture leomao10  路  3Comments

eddywashere picture eddywashere  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

devdelimited picture devdelimited  路  3Comments