PDA

View Full Version : horisontal scrollbars (a bit urgent)



bitbob
05-14-2005, 11:48 AM
Hi all! My first post here...

I'm looking for a custom scrollbar script like the script at www.elstudion.com (http://www.elstudion.com/trepunktnoll/main.html) . Not the script at the bottom of the page but the one that is emediatly visible.

The problem is that I need to scroll horisontal from left to right, and not up and down. I tried to modify the script, but it's just too much for my current knowledge of javascript...

I've searched dynamic drive and all other sites I could think of but to no vail... It's a bit urgent since I'm aproching deadline... If anyone knows anything, please give me a shout :)

thanks in advance

jscheuer1
05-15-2005, 03:29 AM
That script is a bit over my head as well. Have you thought about putting your content in an external page and using an iframe to display it? If you set the height of the iframe to the height of the content, the width of the iframe to less than the width of the content and scrolling=auto for the iframe, it should work out. In IE you could even add custom scrollbars to the content page for a nice effect. To get your content page to be the dimensions you wish, you can set them (width & height) in its body tag.

jscheuer1
05-15-2005, 05:05 AM
Here's what I had in mind:


<html>
<head>
<title>Hor Scroll demo</title>
</head>
<body>
<iframe src="external.htm" width="600" height="300" scrolling="auto" frameborder="0"></iframe>
</body>
</html>and for the contained page:


<html>
<head>
<title>External Content</title>
</head>
<style type="text/css">
body {
scrollbar-face-color: #000000;
scrollbar-highlight-color: #ffffff;
scrollbar-3dlight-color: silver;
scrollbar-darkshadow-color: gray;
scrollbar-shadow-color: gray;
scrollbar-arrow-color: #ffffff;
scrollbar-track-color: #dfdfdf;
}
</style>
<body>
<table>
<tr>
<td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td><td><img src="../thumb2/dumb.jpg" width="140" height="225"></td>
</tr>
</table>

</body>
</html>I didn't need to set width and height for the contained page, as the images' height and width do this for me in this example.

bitbob
05-15-2005, 06:31 AM
Thanks for your suggestions, but this isn't the solution for me. The only reason for me to use javascript is to get rid of the extremly ugly default scrollbars... I need to use my own graphics for this one... (changing the colors of the scrollbars in IE is not a solution either since it only works in IE (and Opera 5 or 6) and that is far from a good looking result anyway)