Currently, I am attempting to create a responsive grid featuring Instagram posts. Unfortunately, the padding-bottom hack isn't effective for my particular situation. After some experimentation, I discovered that the height could be calculated by adding 306px to the width.
Here is how I achieved this using jQuery:
let $instagramPosts = $('.instagram-post'),
width = $instagramPosts.eq(0).width(),
differenceWH = 306;
$instagramPosts.height(width + differenceWH);
I'm wondering if there is a way to achieve this without using JavaScript, solely relying on CSS?