tags:

views:

391

answers:

1

To make a table scroll with a static header I added the following:

tbody.scrollContent {   
    height: 300px;
    overflow:auto;

}

And the html tbody tag has the class:

<tbody class="scrollContent">

It works well, but it added a horizontal scroll to compensate for the width of the vertical scroll bar. I would like my regualr table back with only the addition of the vertical scroll. I tried the links below and other things changing the padding and all different widths of the table (td, thead, th, tr, etc) . It wont go away! Any help is greatly apreciated.
Thanks.

This one
and this answer seems like they avoided the question?
and this one

+1  A: 

overflow-x and overflow-y are supported by IE5+/Win, Firefox 1.5+ (Mozilla 1.8+), and Safari 3+.

tbody.scrollContent {width:300px;height:300px;overflow-x:auto;overflow-y:hidden;}

let me know how it goes

Kieran
That removes the vertical bar and hides the rest of the data. I changed the overflow-x to hidden, which does remove the horizontal scroll bar but the last column is cut off the width of the vertical scroll bar?
Tommy
set the widths of your columns to fit in the area avaliable.
Kieran