View Full Version : image question for thumbnailviewer2

05-21-2013, 05:52 PM
1) Script Title: thumbnail2

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

3) Describe problem: not realy a problem the script is working just fine but I do want to know if it is possible to pre set the max image size.

right now when a visitor mouses over a thumbnail the larger picture shows right where i planned it, but....

if that image exceeds 400X280 it rips my page in pieces.

so I need a line of coding that tells the image never to exceed 400X280 (strange size but thats what I have in space available) best proportions would be (image max size="320X240)

since i have no clue on how to achieve this i came back to the writer hoping i can find a sollution here :)

05-21-2013, 08:27 PM
You can use css style to do that. Say your larger images are shown in the loadarea div, then put this in the head of the page:

<stlye type="text/css">
#loadarea img {
max-width: 320px;
max-height: 240px;

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

05-22-2013, 10:13 AM
hello John,

I have copied the css code as you said to the head of my index page, I placed a picture that is way to big in the image galery and opened the index page.

On opening it displays the image in the dimensions as I wanted, however as soon as I mouse over anyother image and than return to the main imgage it rips the page again.

as requested i have included a link to the site, this is a site not completely finished but functional if you can look at it and hopefully find a sollution I would be very gratefull.


regards martin

STOP! lol my bad, it clearly stated put the css in the HEAD section not under it.

I made the mistake of placing the css you gave me under the head section, after correcting that mistake it is working like a charm!

aswome script and perfect support thank you so much :)