- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 8 Aug 2011 22:24:34 -0700
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: www-style@w3.org
On Mon, Aug 8, 2011 at 8:40 PM, Jonas Sicking <jonas@sicking.cc> wrote: > Hi all, > > There's a layout pattern I'm starting to see on more an more web pages > (and in some UI) that CSS is currently lacking support for, but that I > think would be nice to add. > > One example is: > http://www.yelp.com/search?find_desc=sushi&ns=1&rpp=10&find_loc=San+Francisco%2C+CA Yup, this is a really useful pattern. The Positioned Layout draft on my blog <http://www.xanthir.com/blog/b48H0> addresses this more generally. To do something like "fixed in parent", you'd do this: .fixed-in-parent { position: relative; /* or absolute, whatever */ position-root-top: bottommost(self top, window top); position-root-right: leftmost(self right, window right); position-root-bottom: topmost(self bottom, window bottom); position-root-left: rightmost(self left, window left); top: 0; right: 0; bottom: 0; left: 0; } Hmm, feels like I need to add some magic to make this sort of thing less verbose. ~TJ
Received on Tuesday, 9 August 2011 05:25:22 UTC