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! While you're at it, check out some resources Treehouse students have shared here.

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

General Discussion

Masonry 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
Tom Bedford
15,645 Points

Hi 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:

   var $container = $('#container');
          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.

Hi Tom

Thanks for that I will have a go with that code - love the responsive solution.