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.

static image

<div class="lightbox lightbox--active">     <div class="lightbox__inner">         <div class="lightbox__content" data-lightbox-content="">             <img src="path/to/image">         </div>     </div> </div> 

dynamically loaded image

<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; } 

demo


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -