Jump to:
| Project: | Image |
| Version: | 6.x-1.0-alpha4 |
| Component: | image_gallery |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have been editing the styles in /modules/image/contrib/image_gallery/image_gallery.css and generally this has been working. But I came across an issue. An inline style is being set in the code for a height and width for ul.image li. I can't seem to find where to change the height of 257px. Which is creating a gap in the gallery that is unwanted. My guess is it's hardcoded somewhere. my first guess is that the thumbnail size in the settings were incorrect but no they were right. My only guess is that for some reason the new height value of the thumbnail is not getting written?
My other question is look at this incompatibility between Firefox and IE6 with my site. The spacing gets very weird. i have even changed all the styles back to default and it still displays like this. Anyway to use a table with something like this? I think this would be a correct time to use tables (borderless of course).
Here's the site I am working on. Look at the Single family gallery. (First box on the upper left hand corner)
IE6 versus IE7 or FF
Comments
#1
The second issue cannot be solved in this issue queue.
The first might be valid. I need someone else to confirm this wrong behavior.
Better title.
#2
Do a search for 275 pixels (not 257) should help you find the offending line of code to change (at least in 5.x-2.x-* - but it's been so long that I've forgotten where exactly in the code that was).
Please mark "fixed" if this helped you.
#3
I am goin to look for this today. If it fixes the issue I will change status to fixed. The problem is I figured that much, but couldn't find the inline style in any of the image module files? so i will keep searching and will let you know which line it is. The weird thing is I think it is supposed to write inline styles after setting your thumbnail sizes in the admin. It looks like it took my width and is writing that inline on the page but is also writing a bad width. Like it can't overwrite the width. i am gonna keep searching my files.
#4
Try contrib/image_gallery/image_gallery.module
and fix line, lemmesee, 432:
$height = $size['height'] + 75;#5
Agreed that this is bad practice. Shouldn't hard-code any style into the module's markup creation - instead, change the line:
<?php$content .= " style='height : {$height}px; width : {$width}px;'>\n";
?>
to:
<?php$content .= " class='gallery_image'>\n";
?>
And delete the line with the $height variable assignment. Then simply add a new declaration to the default image_gallery.css file (which can then be overridden in a theme's style.css file):
ul.images li.gallery_image {height:125px; /* Change this to whatever height makes sense for your layout */
}
#6
I think this was my doing when I was working on image gallery 5.x-2.x.
I was aiming for something that would adapt to the thumbnail size chosen for the site, without the user needing to alter the CSS.
This is perhaps not possible, though IIRC I was considering setting the coded height as the height itself, and then using padding or margin in the stylesheet.
#7
#8
OK, I'm brand new at all of this but I just figured it out!
First, read hetta (#4) and torgosPizza (#5) excellent advice. Then in the css that torgosPizza mentions, change the "125px" to "150%"
Now the pictures have the same space no matter what their original dimensions are! Thanks to everyone who had some input as this was really bothering me for awhile.