Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Graham Davidson
Courses Plus Student 14,966 PointsMasonry Plug In Issue
Hi all - is there anyone around that can help me with an issue - this is a paying gig as just need to make this work http://www.plusonetesting.co.uk/whiteLion/front-page.php I am using the Masonry plug in and just getting some really inconsistent behaviour - the whole project will be on GitHub if needed but urgency is of the key. I would also ideally like to communicate with someone on SKYPE about this.
2 Answers

Tom Bedford
15,645 PointsHi Graham Davidson , I had a quick look and am guessing it's a prob with the columns on browser resize? Sometimes it has three other times two or one?
Try changing your masonry code to:
$(window).load(function(){
var $container = $('#container');
$container.masonry({
itemSelector: '.item',
columnWidth: '.item', //keeps the width equal to the item width (useful for responsive sites)
gutter: 10 // adds the space between columns
});
});
If that doesn't fix it [add me on Skype](skype:tomberries?add) and I can have a closer look.

Graham Davidson
Courses Plus Student 14,966 PointsHi Tom
Thanks for that I will have a go with that code - love the responsive solution.
G