- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Fri, 16 Nov 2007 18:28:49 -0500
- To: Alan Gresley <alan1@azzurum.com>
- CC: www-style@w3.org
Alan Gresley wrote: > > This is something to really look forward to. > > In the use case of a fluid box with auto width and height, can the following > positioning be added. It would be useful to be able to position a background > image relative in pixels from either the bottom and right edges, as it is > currently possible from the top and left edges of an element. For example, > if I want to place a background image 10px from both the bottom and right > edge or even -10px from both the bottom and right edge, I can not do it. I Good point. I think we should fix this in CSS3. > propose allowing four positions for a position to deal with these situations. > > If four percentage or length values are given, the vertical top position > comes first, the horizontal right position comes second, the vertical bottom > position comes third, and the horizontal right position comes fourth. The > only way I can see that this could work is having the non used position > values set to auto as below. > > background-position:10px 10px /* top left */ > or > background-position:10px auto auto 10px /* top left */ > background-position:10px 10px auto auto /* top right */ > background-position:auto 10px 10px auto /* bottom right */ > background-position:auto auto 10px 10px /* bottom left */ That's one option. Another would be to specify which corner we're positioning relative to. E.g. background-position: bottom right 10px 10px; That has the advantage that we can position relative to the "start" edge, i.e. the left side in left-to-right text and the right side in right-to-left text. background-position: top start 10px 10px; ~fantasai
Received on Friday, 16 November 2007 23:28:53 UTC