Re: Proposal: Fixed Table Headers in CSS

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