W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: Proposal: Fixed Table Headers in CSS

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 16 Dec 2009 07:28:03 -0800
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Doug Schepers <schepers@w3.org>, "Eric A. Meyer" <eric@meyerweb.com>, Mikko Rantalainen <mikko.rantalainen@peda.net>, www-style CSS <www-style@w3.org>
Message-Id: <41EB2942-F3DC-48AD-8CA7-1462D48BAC0F@gmail.com>
To: news@terrainformatica.com

On Dec 15, 2009, at 10:31 PM, Andrew Fedoniouk wrote:

>> Ah, I see what you're imagining now.  Interesting.  We'll have to give
>> this some thought to see which would end up more useful and more sane
>> to specify/implement.
> As far as I understand this is about so called scrollable grids.
> I think that Microsoft Excel is the most known modern example of this.
> I've made couple of attempts to implements such <table>s and can say
> that configuration like:
> <table fixedcols=1 fixedrows=1 style="overflow:auto">..</table>
> is the least controversial from any other solutions I tried.
> But not perfect of course.
> Here is how such tables may look like:
> http://www.terrainformatica.com/htmlayout/images/grid1.jpg

Interesting. Ideally, we should be able to represent that presentational effect in CSS though. 

In our examples, it works with the full page scrolling too though (the headers stay visible even when the tables start disappearing off the top of the page). If you had an intrinsic width (or fixed width) DIV around the table, you could do something like what you have too, using our 'position:sticky' scheme, by making them the 'overflow:auto' containing block.

> It appears as number of fixed rows/columns defined for the table
> is significantly more robust as a solution rather than defining
> fixed position for each cell.

More robust in what way?

For the horizontal header, you could just define the entire THEAD as the 'position:sticky'. I think it would be kind of handy to also just define a COL as 'position:sticky' too.
Received on Wednesday, 16 December 2009 15:28:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC