Click to See Complete Forum and Search --> : A Scroll bar inside a table??


ff7tifa224
09-17-2003, 01:20 PM
Does anyone know the code to make a table scrolling? Using just html? The page im working with doesnt support Javascript, or frames.

AdamGundry
09-17-2003, 01:29 PM
I don't know about a table, but you can use a fixed-size container with overflow: scroll set. For example:

<div style="width: 50px; height: 50px; overflow: scroll">This content will scroll if it is larger than the size of the containing div.</div>

You can use 'auto' instead of 'scroll' if you want the scrollbar to appear only when necessary. For more info see http://www.w3.org/TR/CSS2/visufx.html#propdef-overflow

Adam

ff7tifa224
09-17-2003, 01:42 PM
Thanks so much that's perfect!

PeOfEo
09-17-2003, 05:40 PM
Also consider overflow:auto; because this will add the scroll bars only when they are needed and you probably wont have that annoying horizontal scroll bar.