View Full Version : How to align a linked image that opens in new window?

06-17-2010, 08:26 AM
Hi everyone, CSS newbie here.

Basically I have an ul that is a group of thumbnails. You click the thumbnail, the larger image opens in a new browser window. What I would like to know is how I can align the image that opens up in the new browser window, and how I can add a caption underneath that image.

Regarding centering the image, my code is:

<li> <a href="cat.jpg"><img src="thumbnail.jpg"></a></li>

What is the CSS I can use to make the "cat" image be centered in its new browser window (and add text underneath if possible)?

Thanks for any help. :)

06-17-2010, 09:26 AM
Have you seen the Lightbox (http://www.huddletogether.com/projects/lightbox2/) effect?

06-17-2010, 12:05 PM
As a newbee I would have a htm-page for the largerpic - I don't know how many you have or what size the pics are or what the caption should be

or as an advanced-bee I would make a JScript to open a new browser-window in a specific size and document.write the content for the new-page
This I guess will be complicated if the caption is an explanation about the pic.

My 2 cents

06-17-2010, 12:08 PM
Have you seen the Lightbox (http://www.huddletogether.com/projects/lightbox2/) effect?

I too suggest using a lightbox effect. Opening up more windows/popups can get a bit annoying at times. :)

06-17-2010, 10:16 PM
Have you seen the Lightbox (http://www.huddletogether.com/projects/lightbox2/) effect?

That worked great, thanks for the link. I've seen it before on another site but I didn't know what it was called, or that I would be able to use it. :)

Major Payne
06-19-2010, 03:40 AM
These may also be of some interest:

VisualLightBox is a free wizard program that helps you easily generate online photo albums, lightbox gallery with a nice Lightbox-style overlay effect, in a few clicks without writing a single line of code: http://lightbox2.com/lightbox2-how.html

Free Jalbum web album software: http://jalbum.net/
Lightbox 2: http://www.huddletogether.com/projects/lightbox2/
Shedding Some Light on Lightbox: http://www.webreference.com/programming/javascript/Lightbox/