Forum Moderators: not2easy

Message Too Old, No Replies

Get rid of horizontal scrollbars on an overflow:scroll div

I want the vertical scrollbars, but the horizontal ones are unnecessary

         

MatthewHSE

8:06 pm on Sep 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone,

I've got a few divs that I want to act like iframes. I've set a height on them and set overflow to scroll. It's working fine except that a horizontal scrollbar appears along with the vertical scrollbar. That makes it look quite bulky. Horizontal scrolling isn't necessary; the content of the div is quite a bit narrower than the div itself. How can I get rid of the horizontal scrollbar?

I love the effect of overflow:scroll, if I could only get rid of those horizontal scrollbars!

Thanks,

Matthew

SuzyUK

8:35 pm on Sep 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try, overflow: auto;

overflow: scroll forces scrollbars whether required or not, auto only produces them when necessary..

PS: I've never bought a CSS book! ;) ... though I did win some once..

Suzy