Results 1 to 3 of 3

Thread: CSS thumbnail hover link problem

  1. #1
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS thumbnail hover link problem

    I need to alter a css script that I use. Currently you hover over a thumbnail and it shows a larger image somewhere else on the page, view it here: http://www.sunbloxtint.com (right column). I need to be able to click on the thumbnail and link to another page in addition to the hover effect. I am blocked and can not figure out how to alter the code to make this happen. Here is the code:



    /* between the head tags */
    <style type="text/css">

    .gallerycontainer{
    position: relative;
    /*Add a height attribute and set to largest image's height to prevent overlaying*/
    }

    .thumbnail img{
    border: 0px solid white;
    margin: 0 0px 0px 0;
    }

    .thumbnail:hover{
    background-color: transparent;
    }

    .thumbnail:hover img{
    border: 0px solid blue;
    }

    .thumbnail span{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 0px;
    left: 0px;
    border: 0px dashed gray;
    visibility: hidden;
    color: black;
    text-decoration: none;
    }

    .thumbnail span img{ /*CSS for enlarged image*/
    border-width: 0;
    padding: 0px;
    }

    .thumbnail:hover span{ /*CSS for enlarged image*/
    visibility: visible;
    top: -155;
    left: 0px; /*position where enlarged image should offset horizontally */
    z-index: 500;
    }

    </style>




    /* Between the body tags */
    <div class="gallerycontainer">
    <a class="thumbnail" href="#thumb"><img src="http://www.wildbynaturetaxidermy.com/images/rcol/sml_main-img1.jpg" width="56px" height="35px" border="0" alt=""><span><img src="http://www.wildbynaturetaxidermy.com/images/rcol/large_main-img1.jpg" alt=""><br></span></a></div>


    Can anyone help? Thanks,

    Jasontor

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Just change the href from #thumb to the page you want it to load the #thumb is so on click it won't load a new page

  3. #3
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much! I can't believe I didn't see that.

    Jasontor

Bookmarks

Posting Permissions

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