Re: Features missing in background graphics through css

On Wed, 7 Aug 2002, Liorean wrote:

> 
> Hello!
> 
> Trying to create a page using the same graphics several times, as 
> background, but on elements not of the same size, I on some issues found 
> the CSS specs lacking.
> 
> 
> First, I'd like to be able to position the center of some graphics, without 
> knowing the size of either the container or the image, at the exact center 
> of the container. Currently, I can only position the upper left corner of 
> the graphics in any given spot. Same thing of course applies to positioning 
> the bottom right corner of the graphics in the bottom right corner of the 
> container, and most combinations in between as well.

I believe 'background-position: center' resp. 'background-position: bottom
right' does exactly what you want.

> 
> Second, I find myself missing a way to stretch a background graphics either 
> to fill the entire container or to fill just the horizontal or vertical 
> space, possibly with repeating in the other direction.

That's not in CSS2, but it is planned for CSS3, see
http://www.w3.org/TR/css3-background

> 
> 
> 
> Some element such as 'background-stretching' with values 'stretch', 
> 'stretch-x', 'stretch-y', 'no-stretch', 'inherit' could be needed, or 
> possibly one (or several) a bit more specific telling how much to stretch, 
> in length either absolute or proportional to container element, in each 
> direction.
> 
> As for the first issue, either moving the anchor point of the graphics 
> together with the anchor point of the container or introducing a separate 
> way of defining anchor point of the graphics would solve it.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 7 August 2002 18:00:02 UTC