Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2010
    Posts
    43
    Thanks
    12
    Thanked 0 Times in 0 Posts

    How to align a linked image that opens in new window?

    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:

    Code:
    <ul>
            <li> <a href="cat.jpg"><img src="thumbnail.jpg"></a></li>
        </ul>
    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.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Have you seen the Lightbox effect?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    sterlingcooper (06-17-2010)

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    New Coder
    Join Date
    Jan 2010
    Location
    UT
    Posts
    35
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by abduraooft View Post
    Have you seen the Lightbox effect?
    I too suggest using a lightbox effect. Opening up more windows/popups can get a bit annoying at times.
    Just here to help.

  • #5
    New Coder
    Join Date
    Jun 2010
    Posts
    43
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Have you seen the Lightbox 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.

  • #6
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    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/programm...ript/Lightbox/
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •