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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs will not link to larger images when clicked

    I am hoping someone can help me with this as I guess I am having a brain fart and cannot figure out why my larger images will not show up when clicking on the thumbs. The highlight like they should when hovering but the larger images are not linking. Please help. I know it's something simple but I cannot see it obviously. Thank you!

    Here's a link to the code in JSFiddle: Edit fiddle - JSFiddle

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,220
    Thanks
    23
    Thanked 606 Times in 605 Posts
    Last time I played with :target, it didn't work the way I thought it should. This time it still has problems and would stick with the old way instead.
    But this is how I'd do it.
    Code:
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta charset="UTF-8" />
    <title>Title of the document</title>
    <style type="text/css">
    .big{
    	display:none;
    }
    :target {
       display:block;
    }
    </style>
    </head>
    
    <body>
    <div id="man">
    <img class="big" id="image1" src="images/big_1.jpg">
    <img class="big" id="image2" src="images/big_2.jpg">
    </div>
    <br /><br /><br />
    
    <<a href="#image1"><img src="images/small_1.jpg"></a><br />
    <a href="#image2"><img src="images/small_2.jpg"></a>
    </body>
    </html>
    Last edited by sunfighter; 06-11-2014 at 07:58 PM.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

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