PDA

View Full Version : Div Scrolling


dwoody
08-23-04, 11:37 AM
Hi,
I am writing a page where I have a div at the bottom that holds a bunch of thumbnail images. If there are a large number of images that I have to insert then I want the div to be able to scroll left and right without disturbing the rest of the page. I have accomplished this but I am not yet satisfied with the location of the scroll bars. I was wondering if there was a way that I could move the left-to-right sliding scroll bar from the bottom of the div to the top. Also I would like to get rid of the up and down scroll bar. Does anyone know how to do this?


<html>

<style>

.imgscroll {color: #000000; background-color: #FFFFFF; width: screen.availWidth; height: 100px; overflow: scroll}

</style>

<body>

<DIV align=center class="imgscroll">

<img src="firstim.gif">&nbsp;<img src="secondim.gif">

</DIV>

</body>

</html>

jamslam
08-31-04, 12:19 AM
Unfortunately, I do not know of any way of moving the horizontal scrollbar's position without extensive javascript work.

Getting rid of the vertical scrollbar is easy, though.
.imgscroll {color: #000; background-color: #fff; width: 400px; height: 100px; overflow: scroll; overflow-y: hidden;}
A few things to note...

'screen.availWidth' is not part of CSS, thusly, it won't do anything.

Secondly, the vertical scrollbar will only disappear in IE- it will still show the vertical scrollbar in firefox, though.

Pineriver
12-28-06, 08:59 PM
<div style="overflow: auto;height: 90px; width: 541px;" >