PDA

View Full Version : Image Thumbnail Viewer Script - making scrollbars overflow



Flipflops
02-29-2008, 01:40 AM
1) Script Title: Image Thumbnail Viewer Script

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

3) Describe problem: I've placed this code on the site and it works well except that both vertical and horizontal scrollbars appear and the content area is expanded. When I click on an image the horizontal bar disappears but the vertical is still expanded.

Removing:

<link rel="stylesheet" href="thumbnailviewer.css" type="text/css" />

is the only thing that brings the scrollbar back to normal but obviously the script doesn't work. This may have a very simple solution but I'm new to this!

jscheuer1
02-29-2008, 04:24 AM
It may be as simple as needing to use a valid URL DOCTYPE for the page. I could tell better what the problem is though, if I had a link to your page:

Please post a link to the page on your site that contains the problematic code so we can check it out.

Flipflops
02-29-2008, 01:51 PM
That could be the problem because I don't have that in the HTML.

On this page, click "gallery", that's where the script is:
http://home.online.no/~petri/lj/plumevine/


I know nothing of DOCTYPE tags, so please let me know how to write a proper one!

Thank you

jscheuer1
02-29-2008, 02:37 PM
That looks like it is the problem, at least part of the problem. Using this script inside of an iframe could also have something to do with it, but it looks like you are going to be OK there because the larger images fit inside the iframe.

Add this to the very top of your gallery.htm file (addition highlighted):


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<!----begin gallery script---->
<link rel="stylesheet" href="thumb . . .

Flipflops
02-29-2008, 04:55 PM
That worked! Thank you!

The only thing is that the scrollbar colour script stopped working, it's not such a big deal though.

jscheuer1
02-29-2008, 05:08 PM
That's not a script, it's style:


<style type="text/css">
body{
scrollbar-base-color: #ccccaa;
scrollbar-arrow-color: #997755;
scrollbar-DarkShadow-Color: #ccccaa;
}
</style>

Change it to:


<style type="text/css">
html, body {
scrollbar-base-color: #ccccaa;
scrollbar-arrow-color: #997755;
scrollbar-DarkShadow-Color: #ccccaa;
}
</style>

Flipflops
02-29-2008, 05:18 PM
You learn something new every day, that worked like a charm, thanks alot! :)