tags:

views:

44

answers:

2

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
A: 

You can use overflow:scroll for each column.

Multiplexer
But you can't use it on a TD. Even using "display: block" will not add scrollbars to a TD.
Kau-Boy
@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
But than you have to say than (as I did earlier). Please don't answer with only a bit of the information :)
Kau-Boy
@Kau-Boy:Thanks for your suggestion. I will try to elaborate from the next time.
Multiplexer