Page 1 of 1

[SOLVED]Lightbox in Gallery thumbnails

Posted: Wed Aug 25, 2010 10:53 pm
by vicpug
Hi,  

Gallery is a great module and works well with square thumbs. I am trying to use the Lightbox template to display nonsquare thumbs and vertically centre the thumbs, but I have had little success with the supplied CSS. Has anyone had any luck on how to do this.  many thanks

Re: Lightbox in Gallery thumbnails

Posted: Thu Aug 26, 2010 7:55 am
by Jos
If you Google on vertical align with css you will find it is very hard... I myself don't know a way to accomplish this

Re: Lightbox in Gallery thumbnails

Posted: Fri Aug 27, 2010 5:14 am
by Dr.CSS
A link to the site would help...

Re: Lightbox in Gallery thumbnails

Posted: Sat Aug 28, 2010 5:33 am
by vicpug

Re: Lightbox in Gallery thumbnails

Posted: Sat Aug 28, 2010 5:25 pm
by nicmare
you could use backgroundimages with background-position:center center; instead of using tags.

Re: Lightbox in Gallery thumbnails

Posted: Sat Aug 28, 2010 7:00 pm
by JohnnyB
Here's the very simple CSS needed to do this.
.gallery {
text-align:center;
}
.gallery .img {
display:inline-block;
margin:10px auto;
max-height:240px;
vertical-align:middle;
}
.gallery .img a {
border:2px solid #DDDDDD;
display:block;
margin:0 10px;
padding:1px;
}
.gallery img {
border:medium none;
}

Note:
for IE6 you will need the following CSS ruleset in a conditional comment:
.gallery .img {display:inline;zoom:1}/* this will force IE6 to respect display:inline-block and show the correct vertical alignment */

Note:
You have two declarations on that page. Actually it is an entire extra html document inside of the template.  You will need to clear up those errors.

SOLVED

Posted: Sun Aug 29, 2010 1:49 am
by vicpug
Many thanks to all who helped. The CSS changes appear to work a treat.  All is good.  cheers