When I installed my gallery (using media 7.x-1.0-beta3) I expected a nice grid of thumbnails. Instead each thumbnail image was stretching to the full width of the content area. (This appears to be the same issue as #25 in http://drupal.org/node/1030942 but is a separate issue from that thread.)

After a little poking around I found that it was no more than a simple CSS error. I haven't tested this patch extensively but it's working for me. I hope this saves some headaches for others!



NPC’s picture

Hi, looking at your patch I don't think you have the same issue - the classes .mg-col and .field-items are used on the specific gallery page - and for me it works well (no stretching). The problem I have is stretching in the View that outputs nodes of gallery type.

Also, you propose this:

-.mg-col > .field-items {
-  width: 100%;
+.mg-col > .field-item {
+  display: inline-block;

Yet .field-items (check the plural), which you suggest delete from the css, is still needed - it is used to make sure the thumbs on the gallery display page are tiled across the whole content area width. I can't check this, since I don't have the same problem that you do, but the issue may be caused by something else.

Fenwick’s picture

My problem was that the thumbnails wouldn't tile without the plurality change (the gallery view code output by the module was singular, not plural.) I'm not certain what's up, in that case. It's working for me now, at any rate.

Zach Harkey’s picture

I was having this same problem. Try switching to the default theme and see if the thumbnails look right. If they look ok, you probably need to make some changes to your custom theme.

kenianbei’s picture

I was able to easily solve this problem in adaptive theme by deleting the field.tpl.php file in the templates directory. The template file is missing some classes that bartik includes I think.

Another solution would be to just copy the system field.tpl.pho file to your theme directory and clear the cache.

Perhaps it has to do with being HTML5 compatible?

elgandoz’s picture

this happens to me with Media-Gallery 7.x-1.0-beta4 when enabling "Taxonomy translation" 7.x-1.0-beta4 (included in "Internationalization - l18n" module. It's not a css issue, the output is nested in a bad way, each item (a gallery collection) is child of the previous. Single galleries nodes are showed properly btw.

avizzino’s picture

Agree: same behavior.
And is reversible: disabling taxonomy translation module collections show properly again.

anavarre’s picture


tiagopb’s picture


joebest’s picture

I'm having the same problem with taxonomy translation as well. Any help?

MasterEmit’s picture

I got it solved with Adaptive Theme the following way:

copied /modules/field/theme/field.tpl.php to /sites/all/themes/adaptivetheme/adaptivetheme/templates/field.tpl.php
removed function "adaptivetheme_field" from /sites/all/themes/adaptivetheme/adaptivetheme/inc/template.theme.inc

Not sure, if there could be any sideeffects now. I will test it. The possibility to drag and drop the order of the gallery-pics is still missing somehow.

MasterEmit’s picture

In addition for users with Adaptive Theme:


totap’s picture

70.48 KB
102.16 KB

I have the same problem but with 7.x-1.0-beta6.

When I turn on "Taxonomy translate" - part of Internalization module, the thumbnails of list of galleries are stretched for full size of content and description about number of pictures or video is gone.

Turning off only this one part of Internalization module - Taxonomy translate is not solution in my case :/

with_TT.jpg - galleries list when Taxonomy translate is turn ON
without_TT.jpg - taxonomy translate turn OFF

Wappie08’s picture

Title: Gallery thumbnails stretch to full width of content area » Conflict with i18n_taxonomy: Gallery thumbnails stretch to full width of content area
Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Needs review » Active

Thanks totap, I was not aware that i18n Taxonomy translate conflicts with the Media module, I have the exact same problem!

Altered the title a bit to make this issue more clear, I've got no time to look into the matter right now..

Greetings Wappie

dwalker51’s picture

I have the same problem and fixed it by disabling the i18n_taxonomy module.

These are the media modules installed

Media 7.x-1.0
Media Gallery 7.x-1.x-dev

lsolesen’s picture

Status: Active » Closed (duplicate)