Click to See Complete Forum and Search --> : scrollbars in div element


TrolloC
04-13-2005, 07:13 PM
Hi,

I would like to disable the horizontal scrollbar in div element, but leave the vertical on auto (only when needed).

How can it be done, if at all?

tnx

Sanim
04-13-2005, 08:53 PM
Scrollbars are for iframes/frames. I don't think you can use a scrollbar on a div, but I could be wrong.

NogDog
04-13-2005, 10:38 PM
<div style="height: 200px; overflow: auto">
However, I don't know of any way to specify to only do vertical scrolling, other than making sure your content fits the div's width. (Normally, if the div just contains headings and paragraphs, they will wrap to the div's width and you'll only get a vertical scrollbar, but graphics and tables that are wider will cause a horizontal scrollbar.)