Reputation: 613
I am using masonry rails gem in order to have my posts nicely transition depending on the screen size and stuff but for some reason I always need to refresh the page in order for masonry to start working. Whenever I first visit a page it has all the posts in one column on the left hand side of the screen, then when I refresh the page is displays the posts properly using the masonry transitions. Has any one experienced this before or possible know a solution to resolve this?
Thanks in advanced!
UPDATE: looking into the console as I thought maybe some css ids or classes weren't being applied on the first load but they all are. I also had disable cache checked so I thought that could have been causing it but after unchecking it the problem persists.
I would greatly appreciate any input on what may be causing this.
UPDATE2: I have tried deleted the masonry code to see if its the masonry causing this to occur or previous styling. It appears to be the styling as the page loads with everything in one column on the left when the masonry is disabled. I am not sure why this happening.
Upvotes: 1
Views: 320
Reputation: 613
I was able to figure it out. I was not including
*= require 'masonry/basic'
in my application.css.scss
After applying this and fixing all the post divs to be the same size masonry is working as it should an no longer are the columns all being pushed to one side. Hooraahh!!
Upvotes: 2