Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

'Gallery' Thumbnail Layout Issue


Go to End


8 Posts   2417 Views

Avatar
Adamski

Community Member, 14 Posts

13 May 2008 at 6:41am

Help..... please....... someone!

Ok, so I might just be being dumb but I can't for the life of me sort this one out.

I want my regular sized (Cropped Resize - 128px x 128px) thumbnails to sit side by side with no gaps - in a mosaic kind of way. I've played around with the CSS and I can't get them any tighter than they currently are....

There is a screenshot here...... http://www.skigo.co.uk/proofs/thumbnailissue.png

Please help, Silverstripe has been awesome for the type of CMS I have been looking for, and this module couldn't be any more ideal but I really need this bit to work for me.

Thanks in advance.
/Adam

Avatar
Adamski

Community Member, 14 Posts

13 May 2008 at 7:53am

I'm one step closer, i've got rid of the gap going across but not between the rows. For some reason it is calculating the table rows at 130px instead of 128px...........

hope someone out there has a bright idea.... (new screenshot)

http://www.skigo.co.uk/proofs/thumbnailissue2.png

/Adam

Avatar
Adamski

Community Member, 14 Posts

13 May 2008 at 8:09am

heh........ me again.

Line Height was the culprit. I set the line height for the table element to 0px and it's now spot on. (not using text in gallery so it's not a problem)

Thanks for listening.... ;-) Sorry for cluttering up the forum.

/A

Avatar
Adamski

Community Member, 14 Posts

26 June 2008 at 6:51am

back again...... turns out that fix worked for everything except IE.

Anybody got any suggestions? This is getting desperate for me now as I have to deliver this site in the next couple of days.

help...................!!!

Avatar
Yellow7 Jon

Community Member, 39 Posts

26 June 2008 at 8:31am

try editing the code in the GalleryContentPage.ss, if i remember correctly it uses tables, and add
cellspacing=0 and cellpadding=0

Avatar
Adamski

Community Member, 14 Posts

26 June 2008 at 8:57pm

you are an absolute legend!!! I cannot thank you enough. You have really saved my skin..

Thank you Thank you Thank You!!!

Avatar
Willr

Forum Moderator, 5523 Posts

26 June 2008 at 10:03pm

if i remember correctly it uses tables..

It should really use something like a ordered or unordered list shouldnt it? Never did like that it used a big old ugly table. Anyone want to volunteer to tidy up the code for the gallery :P

Avatar
Carbon Crayon

Community Member, 598 Posts

9 November 2008 at 4:54am

I have adapted the templates for the gallery to now use CSS to lay out the thumbnails instead of a table. It makes it much easier to edit the look of the images, such as margins etc.

I've just submitted a ticket with the new code :)

if anyone wants the code now, it's included below (remove the numbers from the end of the filenames before using them):