View Full Version : Want a horizontal scroll-bar, but not a vertical
Harry Armadillo
04-08-2005, 06:11 PM
I have a div that displays a tree view for selecting data. Beyond 14 levels of nesting, the display is wider that the 250px it's allocated. I'd like to use a scroll-bar for hortizontal positioning, but overflow:scroll give me both vertical and horizontal -- the vertical one is unneed and is a waste of space.
Can I get just a horizontal scrollbar, or will have to make my own using javascript?
snowieken
04-08-2005, 06:47 PM
There is overflow-x, but apparently it is not supported in Mozilla browsers, although several sources claim otherwise. Anyway, it sure isn't supported in Opera. I have found a workaround, though:overflow:auto;
overflow:-moz-scrollbars-horizontal;
overflow-x: scroll;This should work in modern versions of all browsers. First line is for Opera, second for Mozilla, third for IE.
Harry Armadillo
04-08-2005, 07:00 PM
Perfect! Thanks.
snowieken
04-08-2005, 07:05 PM
No worries!
By the way, I think it only works in Opera if it is applied to a div. If it's the body, then Opera does what it's known for by us webdevelopers: it refuses to cooperate.
Harry Armadillo
04-08-2005, 07:42 PM
It's for an internal app, so I can safely ignore Opera. I'd like to ignore IE...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.