css - IE11 not properly resizing dynamically loaded image -
i'm working on lightbox i'd as possible in css. i'm using viewport units make whole thing responsive. unfortunately ie (i've tested in version 11) doesn't resize dynamically loaded images properly.
compare following jsfiddle's , resize browser see mean.
<div class="lightbox lightbox--active"> <div class="lightbox__inner"> <div class="lightbox__content" data-lightbox-content=""> <img src="path/to/image"> </div> </div> </div> <div class="lightbox lightbox--active"> <div class="lightbox__inner"> <div class="lightbox__content" data-lightbox-content=""> <!-- image loaded js --> </div> </div> </div> any thoughts on how work around this?
ie10+ has been weird width , height attributes (which seem added automatically in case), we'll override them:
.lightbox .lightbox__content img { ... width: auto; height: auto; }
Comments
Post a Comment