Div side scroll

Soldato
Joined
2 May 2004
Posts
19,950
I'd like to have a div that ONLY side scrolls.

Currently I'm using <div class="content"</div> with the CSS .content { overflow:scroll; } but that scrolls down rather than side to side.

Is there any way to make a DIV tag that will hold ALL the content within height:100px & scroll side to side ONLY.

Basically I'm wanting a line of thumbnails in a 'scroll box'.

Thanks,
Craig.
 
I managed to get it working using:

Code:
.content {
  overflow:scroll;
  white-space:nowrap;
  }

The above works perfectly for Mozilla Firefox, but it doesn't scroll in Internet Explorer (I've been testing on 7).

Any ideas of a fix for IE please?

Thanks,
Craig.
 
are your thumbnails 100px in height? you might have to add a few pixels in the height of the div, also might help if you defined the height within content as well
 
Thanks for your help :)

I turned out to be that I forgot to specify the width of the DIV in the stylesheet, your answer got me looking in that area :)

Thanks,
Craig.
 
nice, DIV's are automatically sized to a width of 100% if not specified... it's best to always give a width property on a DIV, well that's the way i do it usually. ;)

Glad you got it fixed!
 
Back
Top Bottom