Anyone know how to vary the width of nodes? I've got even columns to work but can't seem to get that multi-column variable width to work.

Comments

mssoftware’s picture

There seem to be a issue with multi-columns, which has been mentioned here http://drupal.org/node/1825150 too. If you have a 300px width of the Grid and you use images or nodes, which have 600px width (two- or multi-columns), you get overlapping nodes in a 300px masonry grid.

The "masonry view" module inserts the following inline CSS-Code, in the head of the resulting page, when you specify a 300px wide grid in an embedded view:

<!--/*--><![CDATA[/*><!--*/
.view-object-lightbox-tag.view-display-id-block .masonry-item{float:left;margin:10px;width:280px;}

/*]]>*/-->

Notice, that even if you don`t set the gutter width, a margin is set, which may be another issue.

I think, the masonry javascript can`t determinate the real width of your multi-column, because it got overwritten by those inline CSS.

To solve this issue, you can either patch the "masonry view" module code, or overwrite the width in a theme CSS, which is loaded after the inline code using this:

.masonry-item {
  margin: 0;
  width: auto !important;
}

You have to use !important because the inline-CSS would otherwise take precendence over your external theme CSS.

In my mind, #1825150 is a bug. Layouts with multi-column width with "masonry view" module generally do not work, because of this inline-CSS. Only the "float: left" in those inline-css is really needed. Specifying the width explicitly in those CSS will also break fluid/responsive layouts.

Anonymous’s picture

Status: Active » Fixed

As per the project page:

...some default styling is used to make the Masonry grids display properly out-of-the-box (namely the width and margin of items in the grid). You can (and should) override this default styling with your own CSS as appropriate.

Status: Fixed » Closed (fixed)

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