Object-fit: cover lightbox gallery fix in IE? - flexbox

I am using a flexbox gallery with a lightbox that unfortunately uses object-fit: cover, which does not work in Internet Explorer. I have attempted several fixes, but any script with uses these images as a background image prevents the lightbox function from working. Anything else just breaks the lightbox.
Here is the HTML:
<div id="container" class="container">
<figure>
<img src="https://4.bp.blogspot.com/-ZfZfCzTEUD8/W_or2JcZttI/AAAAAAAABmY/fGcfprjhrFQxKqB839BxyaAMbH2G-IqEQCLcBGAs/s1600/echelon-airways-logo.jpg">
</figure>
<figure>
<img src="https://3.bp.blogspot.com/-fjDfU6XgmKU/W_oPkL4NjwI/AAAAAAAABjc/EQRV8u8VS3k1pHlSRDiarQyazViKhQ37ACLcBGAs/s1600/Plane.jpg">
</figure>
<figure>
<img src="https://3.bp.blogspot.com/-G-B67WiRq2I/W_oP7AwRuKI/AAAAAAAABj4/hIMHAElHsrYMIYN4b91pkJjYjAlm7hj7ACLcBGAs/s1600/echelon-airways-font.jpg">
</figure>
<figure>
<img src="https://1.bp.blogspot.com/-3DLPWVTq4kc/W_ofx4hCcyI/AAAAAAAABkc/_-JymxNKaHshJucgVMYPsvLZNyKkf3p5QCLcBGAs/s1600/echelon-book-1.jpg">
</figure>
<figure>
<img src="https://4.bp.blogspot.com/-3yS1d6DGN2o/W_ofxy8IS-I/AAAAAAAABkg/CHq82FGEiVYglcvYcOaker9cUlhqrFA_QCLcBGAs/s1600/echelon-book-2.jpg">
</figure>
<figure>
<img src="https://4.bp.blogspot.com/-ZUdiGM8QpGQ/W_okanO7SNI/AAAAAAAABlk/IiKnQV3EuSwNelF-zusQaqkfX9TvIwjjQCLcBGAs/s1600/echelon-book-3.jpg">
</figure><figure>
<img src="https://2.bp.blogspot.com/-xC1h_we5k6U/W_oPkX2o1UI/AAAAAAAABjg/Im9d0gmJgDcVf2aLAVmagQ62CQUKzqgLQCLcBGAs/s1600/echelon-airways-website.jpg">
</figure>
<figure>
<img src="https://4.bp.blogspot.com/-47xZ9mvq5j0/W_ooJC3-CZI/AAAAAAAABmI/X9Ws38hn8d0Jvg_UNJVTXZ2hgf7nT_gGACLcBGAs/s1600/echelon-boarding-pass-front.jpg">
</figure><figure>
<img src="https://3.bp.blogspot.com/-R6Ae3B20pFY/W_ooJF5o3ZI/AAAAAAAABmE/GwW86TkOHUw4yJ5rOKO98A7LoRtmZjuEwCLcBGAs/s1600/echelon-boarding-pass-back.jpg">
</figure>
<figure>
<img src="https://3.bp.blogspot.com/-MZ-J_ZkZ4ac/W_pRT51eUZI/AAAAAAAABnA/D_O3lWeDhNI-Uu7BcE-wuxIH0MITnlvaQCLcBGAs/s1600/echelon-airways-magazine-3-b.png">
</figure>
<figure>
<img src="https://2.bp.blogspot.com/-oIj8sZMyja4/W_pOuEsXVMI/AAAAAAAABmo/wEDfRCDK_c4GV1qHo3CYIjZBXz37zVT6QCLcBGAs/s1600/echelon-airways-magazine-2.jpg">
</figure>
<figure>
<img src="https://1.bp.blogspot.com/-3wh16D8yRt0/W_pQicl06TI/AAAAAAAABm4/73GQHrmiPuktsO_h6bSdzYLSDOK80RlQACLcBGAs/s1600/echelon-airways-magazine-3.jpg">
</figure>
</div>
And the javascript:
<script src="https://code.jquery.com/jquery-3.2.0.min.js"></script>
<script>
(function($) {
$.fn.flexgal = function(){
$('body').prepend('<div id="fullimage" style="display: none"></div>')
$(this).addClass('flex-gallery');
$('img', this).parent().addClass('image-rate');
$('.image-rate').click(function() {
$('img', this).clone().prependTo('#fullimage');
$( "#fullimage" ).fadeIn("slow");
});
$('#fullimage').click(function() {
$(this).fadeOut( "slow", function() {
$('img',this).remove();
});
});
}
}(jQuery));
</script>
<script>
$('#container').flexgal();
</script>
</div>
Is there a way to make the images remain proportional in Internet Explorer? Here's an example of the page: http://jh-portfolio-test-2.blogspot.com/2018/11/project-test.html

Related

videos loaded on the website displays only on safari but not on other browsers

the videos only display in Safari but not on other browsers, how do I get them to display on all browsers?
<div class="row row-0-gutter">
<!-- start portfolio item -->
<div class="col-md-6 col-0-gutter">
<div class="ot-portfolio-item">
<figure class="effect-bubba">
<img src="videos/defensea.mp4" alt="img" class="img-responsive" />
<figcaption>
<h2>Defense Tech</h2>
<p>Systems, Solutions, Supplies</p>
View more
</figcaption>
</figure>
</div>
</div>
<!-- end portfolio item -->

Isotope packery layout stacking images

I am trying to make a packery layout that uses the the width of an image. Whether it is 400px or the width of the entire container, I would like to fill up the space with my images. I don't want any whitespace either. Can someone tell where I am going wrong. Code and codepen are below.
<div class="grid" style="width:1200px; height:100%; background:salmon">
<!-- <div class="grid-sizer"></div> -->
<div class="grid-item one"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:200px" /></div>
<div class="grid-item two"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:400px"/></div>
<div class="grid-item three"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:300px"/></div>
<div class="grid-item one"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:600px"/></div>
<div class="grid-item two"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:900px"/></div>
<div class="grid-item three"><img src="https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg" alt="" style="width:300px"/></div>
</div>
$('.grid').isotope({
// options
layoutMode: 'packery',
packery: {
columnWidth: '.grid-item'
},
itemSelector: '.grid-item',
percentPosition: true
});
http://codepen.io/Jesders88/pen/GrpqQr
I had the exact same issue and switched to a packery package.
Take a look at this link http://packery.metafizzy.co/
When I tried using isotope with a packery layout mode it didn't work: http://demoserver.co.za/test2.html
When I switched to the above it worked great: http://demoserver.co.za/test3.html

Changing Gutters only for a section using susy

I'm building a site with susy to allow flexibility with the grids I need, I have not set any settings at the moment so Im only using the defaults.
I want to be able to change the gutters (make them smaller) for a section of the site.
I built it out here:
http://sassmeister.com/gist/89243b68852fdd9cf282
SCSS
.feature-box-container
{
#include container(80em);
.feature-box
{
#include gallery(4 of 12);
img
{
margin-bottom:20px;
width: 100%;
}
}
}
HTML
<div class="feature-box-container container">
<div class="feature-box">
<!-- 450 -->
<div>
<img src="http://placehold.it/355x170" alt="">
</div>
<div>
<img src="http://placehold.it/355x280" alt="">
</div>
</div>
<div class="feature-box">
<div>
<img src="http://placehold.it/355x317" alt="">
</div>
<div>
<img src="http://placehold.it/355x133" alt="">
</div>
</div>
<div class="feature-box">
<div>
<img src="http://placehold.it/355x270" alt="">
</div>
<div>
<img src="http://placehold.it/355x180" alt="">
</div>
</div>
</div>
In the picture it has the sites default, but I need only this section to have at least half the gutter width it has now.
You can use the with-layout mixin to [change your grid settings for a nested block of code]](http://susydocs.oddbird.net/en/latest/settings/#with-layout).
#include with-layout($new-settings) {
// code you want affected...
}

masonry overlaping images - try all tutorial but nothing

I have :
<div id="container" class="masonry js-masonry">
<div class="item">
<img width="128" alt="image.jpg" class="image" src="small/thumb_Jennifer_Aniston-wallpaper.jpg">
</div>
<div class="item">
<img width="128" alt="image.jpg" class="image" src="small/thumb_Jennifer_Aniston-wallpaper.jpg">
</div>
</div>
and:
<script src="js/masonry.pkgd.min.js"></script>
<script src="js/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript">
var container = document.querySelector('#container');
var msnry;
// initialize Masonry after all images have loaded
imagesLoaded( container, function() {
msnry = new Masonry( container );
});
</script>
Masonry work as axpected but images overlap.after I rezise the browser they show in the right way.
What is wrong? How shoud I do it?

SVG Image linking

I am trying to make my vector image clickable. I have searched the internet and can not find the answer. What else do I need in the code?
<div id="logo">
<a href="http://fpmnky.com" target="_self">
<span>
<object width="488" height="115" data="http://fpmnky.com/images/fpmlogo2.svg" type="image/svg+xml">
<img width="488" height="115" src="http://fpmnky.com/images/fpmlogo2.svg" alt="Star"/>
<span>Your browser doesn't support SVG images</span>
</object>
</span>
</a>
<div id="logo">
<a href="http://fpmnky.com" target="_self">
<img src="http://fpmnky.com/images/fpmlogo2.svg" width="488" height="115" alt="fpmlogo" />
</a>

Resources