PDA

View Full Version : Thumbnail Viewer how do I un-center



BigMrC
09-06-2010, 12:58 PM
1) Script Title: Image Thumbnail Viewer

2) Script URL (on DD): www.dynamicdrive.com/dynamicindex4/thumbnail.htm

3) Describe problem:

Hi I have one question on this - how do I recode to display the enlarged image in a different position. I want it to be eg 50 pixels from top of screen instead of centred completely on screen. Reason being I have a strip of photos and it would work perfectly if the enlarged images always appeared above them so could just click on each one to enlarge without having to close the enlarged one each time.
Many thanks

azoomer
09-06-2010, 02:55 PM
it may be somewhat easier to use this script
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm
here you can taget the id="loadarea" directly with css

BigMrC
09-07-2010, 11:12 PM
Hi thanks for that. Am trying the viewer II script that you linked to, but how do I code that to appear centered. I've tried the following:

#loadarea {
position: absolute;
margin: 0 auto;
text-aligh: center;
}

And variations but can't get it. Can you advise.
Thanks

BigMrC
09-07-2010, 11:57 PM
Hi I think I've found a way to centre the viewer2 script, but how do I get it to close the emlarged image. With the viewer1 script you can click the enlarged image to close but it can't be centered. With the viewer2 script I can center it but can't close it by clicking.

Many thanks

azoomer
09-08-2010, 12:02 AM
It should work if you use position: relative

#loadarea {
position: relative;
margin: 0 auto;
text-align: center;
}

If you want to use position absolute the following will probably work


#loadarea {
position: absolute;
left:50%;
margin-left: -200px;
text-align: center;
}
The margin left is set to the negative value of the loadareas width divided by 2, thus assuming the width is 400px in this case.

BigMrC
09-08-2010, 12:04 AM
Thanks, I've got it centred, just need to be able to click on the enlarged image to close it?