Current location: Hot Scripts Forums » General Web Coding » CSS » Div Scrolling


Div Scrolling

Reply
  #1 (permalink)  
Old 08-23-04, 10:37 AM
dwoody dwoody is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Div Scrolling

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?

Code:
<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>
Reply With Quote
  #2 (permalink)  
Old 08-30-04, 11:19 PM
jamslam jamslam is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Code:
.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.
Reply With Quote
  #3 (permalink)  
Old 12-28-06, 07:59 PM
Pineriver Pineriver is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
This would do the trick with a style

Code:
<div style="overflow: auto;height: 90px; width: 541px;" >
__________________
Web PHP Programmer - http://vmist.net

Last edited by Christian; 12-29-06 at 02:23 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return position with Javascript? loudsox JavaScript 2 07-09-04 12:16 PM
div backgrounds Iriel CSS 5 05-31-04 08:48 PM
Is it possible to put dynamic data display in a scrolling watermark? Whipsmack JavaScript 1 03-29-04 08:22 AM
Help with scrolling iframe pongo Script Requests 3 01-15-04 10:04 PM
JScript Scrolling Text-Help jah JavaScript 1 11-20-03 01:39 PM


All times are GMT -5. The time now is 01:33 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.