I installed

Masonry API
7.x-2.0
Masonry Views
7.x-1.0

I tried with
7.x-1.1 version of Masonry API but it did not help

I tried all versions of juery 1.7 - 1.10 in Jquery Update

I've got a code

.masonry-item {
float: left;
width: 30%;
border: 1px solid #666;
background-color: #666;
margin: 10px;
padding: 5px;
}

in my css

I have

jquery.masonry.min.js in sites/all/libraries/masonry
from http://desandro.github.io/masonry/jquery.masonry.min.js

but still

There is no masonry effect.

How to make it work?

P.S.

Finally fixed with combination of:

jQuery Masonry v2.1.06 https://github.com/desandro/masonry/releases/tag/v2.1.06
Masonry API 7.x-2.0
Masonry Views 7.x-1.0
jQuery Update 7.x-2.4 1.8 version

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

leramulina’s picture

Title: Cannot make masonry effect work » Cannot make masonry effect work [FIXED]
Issue summary: View changes
leramulina’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kyleheney’s picture

Category: Bug report » Support request
Status: Closed (fixed) » Active

No matter what I do, I cannot make the effect work. I have tried the configuration given above and it still doesn't give any effect.

jQuery Masonry v2.1.06
Masonry API 7.x-2.0
Masonry Views 7.x-1.0
jQuery Update 7.x-2.5 1.8 version (jQuery and jQuery UI CDN: None)

Status report looks good. Bricks do not rearrange when the window is resized.

marty.true’s picture

@leramulina, can you please share your "fix" in this issue? It is always best practice to post your resolutions when you figure things out on your own, so that others having the same problem can benefit from your new found knowledge.

Dom.’s picture

Status: Active » Fixed

Cleaning up the issue list as part of new maintainer ramp-up on that module.
I will only support 3.x version. Thanks for your comprehension.
Dom.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sher1’s picture

Status: Closed (fixed) » Needs review
FileSize
118 bytes
277 bytes

I have uploaded a css file (with ending of text because I can't attach css files) and a new info file to include the css. This will allow people to just turn on the module and have things work. This will work for any of the versions. The version I use is the 7.x-3.0-beta1 but the change is simple enough that it will work for any version. The other option would be to add this as a readme

sher1’s picture

Here is a patch file

Dom.’s picture

FileSize
526 bytes

Here is a patch attached with some corrections regarding the following:

  1. +++ b/masonry_views.css
    @@ -0,0 +1,8 @@
    +float: left;
    

    Not needed: this is Masonry Layout magic !

  2. +++ b/masonry_views.css
    @@ -0,0 +1,8 @@
    +border: 1px solid #333;
    +background-color: #333;
    

    Too dark for Drupal default theme

  3. +++ b/masonry_views.css
    @@ -0,0 +1,8 @@
    +margin: 10px;
    +padding: 5px;
    

    Let's make this percent thus more flexible.

  4. +++ b/masonry_views.info
    @@ -4,6 +4,7 @@ core = 7.x
    +stylesheets[all][] = masonry_views.css
    

    Wrong way to include. This way, the CSS will be included on everypages. It takes to be included for the view display only via drupal_add_css on preprocess_view method.

  • Dom. committed 7de9ced on 7.x-3.x
    Issue #2278909 by Dom., sher1: Cannot make masonry effect work without...
Dom.’s picture

Commited on dev branch. Will be included in next release.

Dom.’s picture

Status: Needs review » Fixed
grinxols’s picture

Hi,
This CSS file breaks my Masonry grid :(
I use a 12 column Bootstrap based theme, and my masonry-item elements have also specific classes that indicate the percent width of the columns (for example, col-sm-4 indicates that masonry-item occupies 4 columns (33% of the total width)). More info at http://getbootstrap.com/css/#grid.
This CSS file adds border, padding and margin to masonry-item, making it wider and therefore breaking my grid.
Renaming or deleting this file solves my problem, but... Is there another option to solve this issue?
Thanks!

NIKS_Artreaktor’s picture

grinxols

If you simply delete thous files - Drupal will get error to when trying to find them.

It is another way to hack this

		.masonry-item{
				padding-top:0;
				padding-bottom:0;
				margin:0;
				border:none;
				background-color:transparent;
		}
Dom.’s picture

My goal is to give minimum CSS for site builders that use the module with no dev. For other, it implies to add some css to there theme as per @NIKS_Artreaktor suggestion.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.