Hmm, I gave this a try. Setting height stretches the table rows out vertically if there are less records than the height. I tried putting a fixed height div around the table and not setting a height on the tbody, but then the tbody overflow-y never kicks in. Hmm.

Also, if I set the height of the tbody and the overflow-y does kick in, then the scrollbar eats horizontal space in the rightmost col, which means that I need to style that col to allow for it. Either way: if the scrollbar were to show outside the table I'd need to allow room for it, but just bringing it up as a caveat.

I know this issue has been tackled various ways in table plugins, but I don't think I've seen a plugin made specifically just for show/hiding a scrollbar and working around some of these issues. Anyone?

Thanks,
Jack

Matt Zagrabelny wrote:
On Thu, 2009-10-01 at 22:25 -0400, Karl Swedberg wrote:
have you tried overflow-y: auto; ?

This works... (to some degree)

table tbody {
  height: 799px;
  overflow-y: auto;
  overflow-x: hidden;
}

Cheers,



Reply via email to