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

Re: Proposal: Fixed Table Headers in CSS

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 15 Dec 2009 16:27:35 -0600
Message-ID: <dd0fbad0912151427r4dd2beb3q53e16b3f77c5eed2@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Doug Schepers <schepers@w3.org>, "Eric A. Meyer" <eric@meyerweb.com>, Mikko Rantalainen <mikko.rantalainen@peda.net>, www-style CSS <www-style@w3.org>
On Tue, Dec 15, 2009 at 4:17 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> I see what you mean now about accumulating. You don't want the H2 to push
> the h1 in it's grandparent off, right? But I don't see how you prevent that
> if the 'top' of the H2 is relative to the offscreen top of the section.

The two values are relative to the same edge, *but* in my conception
sticky elements somehow never overlap, just like floats.  How this
works, precisely, when you're mixing top-sticky and left-sticky
elements, frex, is up in the air.

> You
> could do something like the following to prevent the H1 from being pushed
> off:
>
> h1 { position: sticky; top: 0; }
> h2 { position: sticky; top: 2am; }

Nah, that doesn't work well.  If you have another <h1> further down,
it would (1) overlap the current sticky <h2> temporarily before it
displaced the <h1>, and (2) display the last <h2> of the previous
section until a following <h2> displaced it. (Well, it would do so in
the first example.  The second example would work properly, assuming
that the <h1> was 2em tall.)

I'm also not certain how your idea of this working actually causes
things to be displaced.  The way you're stating it it seems like later
sticky things just overlap previous ones, hiding them behind.

~TJ
Received on Tuesday, 15 December 2009 22:28:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:47:12 GMT