View Full Version : Thumbnail Viewer Alignment Issue

05-19-2006, 02:18 PM
Script: Image Thumbnail Viewer

I have this script installed, and it works great in all browsers except Safari. In Safari, sometimes the image windows appear where you click (as they're supposed to), but if you scroll down and click on one of the thumbnails farther down the page the image window loads in a random location even farther down the page--not directly over the clicked thumbnail. Here's a page I'm working with:


Is there any way to fix this? I noticed that it's working perfectly on the demo page, so I'm hoping I just need to rearrange the div tag or something easy...

Thanks in advance for your help!

05-20-2006, 05:15 AM
The script is not rated for Safari. I don't have a Mac to test on and neither does DD. The demo page has just a few images in one location so, it is no real test for Safari. I would guess that whatever the script uses to determine how far the page has been scrolled and/or the location of the item clicked needs to be reworked for Safari.

05-20-2006, 05:23 AM
I'm just looking at the script some more, it uses this:

var ie=document.all
var ns6=document.getElementById&&!document.all

to determine which browser it is being used on. If Safari recognizes document.all but not clientHeight, that would be the problem. I'd try changing the above to:

var ie=document.all&&!document.getElementById
var ns6=document.getElementById&&document.all

If that fixes it in Safari, it will mess it up in other browsers but, at the same time, it will let me know how to fix the script's code for Safari and the others. If it doesn't take care of things in Safari, then I'm not sure what the problem is.

02-17-2007, 08:43 PM
Somewhat related to the Safari alignment question. I am using Image Thumbnail Viewer II at http://davissignstudio.com I resolved an alignment issue by adding valign="top" to the <td> tag that contained the loadarea, everything works as expected in Safari. My problems are with FireFox and iCab (the only other browsers I have used to view the site, don't do windows, so I don't know what it looks like in IE or others). My problem is when an image is loaded in the loadarea in Safari the page size adjusts an allows the image to load with no overlapping. In Firefox and iCab the page does not resize and the image either goes over or under elements on the lower part of the page. I figure I could probably work around this by designating the height and width of the load area and or adjust the size of the images being loaded. But I would rather make all browsers work like Safari. I use standards compliant code and hope that all browsers render my site the way I intend it to look.

02-17-2007, 10:09 PM
The problem is that you have an explicit height declared for the loadarea DIV:

<div id="loadarea" style="width:500px; height: 250px">

Firefox will honor that as it should. Just remove the height attribute.

p.s: In the future please start a new thread for new questions (instead of replying to another one).