So get it back to a state such that you have a 3x3 grid with that extra box beside it, and a 2x3 grid for mobile, and then come back and we’ll try and figure out how to change it.
This is really a matter of pure CSS; instafeed just adds items (as specified in the template option) to a container element, and you can then use CSS grid to align them the way you want; for example:
<div id="instafeed" class="container">
<h1>Instagram</h1>
<!--
Gets filled with 9 x
<a href="..."><img src="..." alt="..."></a>
-->
</div>
I only dabbled in CSS grid myself though… not sure if this is the best way to achieve this (e.g. the “Instagram” headline box now has a fixed width rather than stretching to the right border as in your sketch). I’ll move this topic to the CSS category, maybe someone more knowledgeable like @PaulOB has a better solution. :-)
@m3g4p0p Thanks for this, I went away and did it myself i have the Instagram part in the position I want it in but for some reason when I go into mobile my limit is not working I set it 6 but it still shows 11!
var screenwidth = window.matchMedia("(min-width: 900px)").matches;
var Feed({
limit: screenwidth ? 11 : 6,
Well i’d wrap that ternary in parenthesis, but it seems as though that should work… as long as nothing has changed screenwidth between the first line and second one… (and it’s still in scope…)
It does seem to work now but i believe its because of the browser size when i shrink to mobile and refresh theres 6 showing and when i grow and refresh there is 11
Yes, that media check only runs once initially and doesn’t automatically update the feed when you resize the window (which would technically be possible with a resize event listener, but that would mean a lot of unnecessary requests). What you might do though is simply hide all elements after the 6th link for media queries < 900px: