Active
Project:
Galleria
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 May 2009 at 23:34 UTC
Updated:
10 Sep 2010 at 05:37 UTC
Jump to comment: Most recent
Comments
Comment #1
Mark Theunissen commentedGood question, you can probably start with:
On the ul element.
The problem is that you have to specify a width, and this probably won't work on IE. I took a quick look online for how to center a bunch of floating divs but it doesn't look like there's one elegant solution. I'm not a CSS wizard either, my bag of tricks is limited to fixing and diagnosing the most common compatibility problems.
Comment #2
apresskibrewer commentedHey Mark,
thanks for the rapid reply! Really amazing support for this module...
Anyway, maybe I'm showing my true colors here, but where is the best place to slap in this code?
Comment #3
eromba commented@apresskibrewer: To use what Mark suggested, put the following at the end of your theme's stylesheet, adjusting the width value as necessary:
This code should work regardless of whether Galleria is embedded in the page or in a lightbox.
In my tests, this styling displays correctly in IE7, IE8, and Firefox 3.5 B4.
I hope this helps!
Comment #4
apresskibrewer commentedHelps immensely. Looks like its time for me to pick up a CSS resource if I'm going to continue to play with this stuff.
You guys have been great, awesome support. Thanks mark, and prof1337.
Comment #5
apresskibrewer commentedHave you guys tried this with galleria that has more than a few images? As I continued to add to my galleria, it prematurely started a new row of thumbnails with this function. When left aligned, it will allow 8, but when using the centering style code, it only allows 3 (maybe 4 or 5 depending on the thumb dimensions/margins input)
It's not a huge deal, I'm just trying to avoid a scroll bar/ keep as much info to the north of the page as possible. Is there any way to manually set at what overflow number the galleria would begin to render the second row?
again, the gallery i'm speaking of is at http://www.kenfrankmasonry.com/?q=content/galleries
If your curious.
Thanks a ton again.. btw, off topic, is there a donate button or something, somewhere?
Comment #6
eromba commentedThere's no way to control exactly what number of thumbnails will display in a given row, but changing the width of the unordered list will effectively do the same thing.
To change this width, use the same styling from #3, but replace "50%" with another value. Since the thumbnails on your site's Galleria are each 70 pixels wide with a 5 pixel right-margin, you can simply set the unordered list's width to multiples of 75 pixels (ie. "75px" for one image per row, "150px" for two images, etc.). I've tested this in Firefox via Firebug and it seems to work quite well.
Comment #7
apresskibrewer commentedI was on the right track... thank you! Seems to work beautifully.
Comment #8
Mark Theunissen commentedGreat news! If you really want to donate, feel free to pop a tip into the Drupal Association's jar:
http://association.drupal.org/civicrm/contribute/transact?reset=1&id=8
Comment #9
glennnz commentedHiya
#3 works a treat for a fixed number of thumbnails. What about a varying number?
I have my main image centred fine, now I want the thumbnails to be centered underneath, no matter how many there are, and expand sideways until there is no width left, and only then drop to a new line.
Cheers
Glenn
Comment #10
Anonymous (not verified) commentedI had similar problems because I had 2 gallerias - one with small images and one with large.
What I did was add some jquery script in the node to dynamically add a class to the galleria
then created the css
which fits all the thumbnails under it.
That seems to work. Any other suggestions?
Comment #11
bennash commentedAt some point the module's output html changed. The following updates the above code from #3
.galleria-thumbnails {
margin-left: auto;
margin-right: auto;
width: 50%;
}