Masonry Grid

Hey guys. I’m using masonry grid for a blog content. How I will change the height of the grid if the screen is change? Tbh. I don’t even know the calculations. For example; assume that I choose the Nexus 4 on device toolbar the element of grid will be like this;

<div class="grid" style="position: relative; height: 2304px;">

If I choose Nexus 5;

<div class="grid" style="position: relative; height: 2160px;">

Current:
<div class="grid" style="position: relative; height: 1011.75px;">

JavaScript:

$(window).resize(function() {
   var gridheight = $('.grid').height() * 4;
   $(".grid").height(gridheight);
}).resize();

Hi are you talking about this masonry grid ?

The demo seems to be automatically responsive to device and screen size so I don’t quite understand the question (although I am not familiar with using masonry).

I think we will need to see the page in question so we can see what the issues are exactly.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.