Re: [whatwg] Tables, headers and bodies

5 views
Skip to first unread message

Boris Zbarsky

unread,
Apr 1, 2012, 8:39:48 PM4/1/12
to wha...@lists.whatwg.org
On 4/1/12 4:43 PM, Nils Dagsson Moskopp wrote:
> Jose Fandos<iamin...@gmail.com> schrieb am Sun, 1 Apr 2012 21:15:10
> +0100:
>
>> Can anyone point to any discussions about table headers and table
>> bodies and how to deal with having a fixed header and a scrollable
>> body?
>
> Did you try “overflow: scroll” and a fixed height on<tbody> elements?

Nils, did you?

It doesn't work, and the CSS spec explicitly says that it should not
work at the moment.

-Boris

Nils Dagsson Moskopp

unread,
Apr 1, 2012, 11:10:51 PM4/1/12
to wha...@lists.whatwg.org
Boris Zbarsky <bzba...@MIT.EDU> schrieb am Sun, 01 Apr 2012 20:39:48
-0400:

> On 4/1/12 4:43 PM, Nils Dagsson Moskopp wrote:
> > Jose Fandos<iamin...@gmail.com> schrieb am Sun, 1 Apr 2012
> > 21:15:10 +0100:
> >
> >> Can anyone point to any discussions about table headers and table
> >> bodies and how to deal with having a fixed header and a scrollable
> >> body?
> >
> > Did you try “overflow: scroll” and a fixed height on<tbody>
> > elements?
>
> Nils, did you?

I didn't and got caught. How very disappointing of me.

> It doesn't work, and the CSS spec explicitly says that it should not
> work at the moment.

However, according to a comment on the relevant WebKit bug, the CSS
basic box model working draft does imply overflow behaviour on table
boxes <https://bugs.webkit.org/show_bug.cgi?id=3239#c17>.

--
Nils Dagsson Moskopp // erlehmann
<http://dieweltistgarnichtso.net>

Tim Streater

unread,
Apr 2, 2012, 6:42:00 AM4/2/12
to wha...@whatwg.org
On 01 Apr 2012 at 21:15, Jose Fandos <iamin...@gmail.com> wrote:

> Can anyone point to any discussions about table headers and table bodies
> and how to deal with having a fixed header and a scrollable body?
>
> I've done a number of searches but might not be using the right terms to
> unearth any previous discussion in this regard.
>
> The idea is a quite common situation in software interfaces of all kinds
> where the headers will always be visible while the table rows (table body)
> will scroll.

The only way I found to do this is to have two tables, fixed cell widths, overflow hidden, and textOverflow ellipsis. There is additional CSS to get the two tables to look like one.

--
Cheers -- Tim
Reply all
Reply to author
Forward
0 new messages