Jump to content

Recommended Posts

I am trying to duplicate a image viewer for a client and am having a very difficult time of it. Not even sure this can be done without Javascript. It must be embedded inside of my index page, rather than creating a new gallery page.

 

The example I'm trying to duplicate can be seen here: http://tuscany-villa.luxuryvillasint...-29-1-1717.htm

 

What I have so far in my CSS is:

#slideshow {

background-color: #FFFFFF;

height: 289px;

width: 632px;

position: relative;

left: 0px;

top: 0px;

}

#scroll {

background-color: #CCCCCC;

float: left;

height: 289px;

width: 140px;

margin-left: 40px;

overflow: auto;

position: relative;

}

#bigimage {

background-color: #FFFFFF;

float: left;

height: 289px;

width: 452px;

position: relative;

background-image: url(images/house-back1-lg.jpg);

background-repeat: no-repeat;

}

 

What I want to make happen is to create a link in the .html for each thumbnail image to show its counterpart (larger image) in the #bigimage DIV.

 

So far all I have is the #scroll populated with the thumbnails and properly scrolling like the example, but can't make the larger image appear inside the DIV. (large images are already created in same images file)

 

Is this possible, or does anyone know of a script that exists to do this exactly? I've searched for a long time now to no avail!!

Link to comment
https://forums.phpfreaks.com/topic/86791-thumbnail-viewer-made-of-css-only/
Share on other sites

You can do this with only CSS. Obviously no one is going to write the code for you because knowing how to do this kind of thing is how some people make a living!

 

But Stu Nicholls at www.cssplay.co.uk has some examples on his website (under "demos") that you can adapt if you are prepared to leave his copyright buried in your css code.

You can easily make it "similar" with css, but IT only uses a hover effect for the thumbnail to show the photo. It doesn't use on click, and the photo will switch back to the default viewable photo when the thumbnail is not hovered on.

 

It is done using absolute positioning and visibility for the large photo and hovers for the thumbnail.

 

But, without some very simple js, particular on click or on hover and show and hide, it will not act the same as you want it to.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.