How to add scrollbar in each column of html table ?
A:
You can't add a scrollbar to a cloumn, as far as I know. But you can do the following:
- Insert a DIV inside your table cell
- Set the height of that DIV to a fixed height
- Use "overflow: scroll;" on that DIV
If the content exceeds the height of the DIV you will see a scrollbar.
EDIT: If you want only a horizontal scrollbar you can use "overflow-x" if you only want a vertical scrollbar use "overflow-y".
Kau-Boy
2010-06-18 08:49:56
But you can't use it on a TD. Even using "display: block" will not add scrollbars to a TD.
Kau-Boy
2010-06-18 08:59:19
@Kau-Boy:I mean, inside TD there we have to create a DIV of same height and width of TD. To that DIV we have to apply this overflow.
Multiplexer
2010-06-18 09:25:53
But than you have to say than (as I did earlier). Please don't answer with only a bit of the information :)
Kau-Boy
2010-06-18 09:46:44
@Kau-Boy:Thanks for your suggestion. I will try to elaborate from the next time.
Multiplexer
2010-06-18 09:52:17