W3C home > Mailing lists > Public > www-style@w3.org > August 2002

Re: Features missing in background graphics through css

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Wed, 7 Aug 2002 21:59:59 +0000 (GMT)
To: Liorean <Liorean@user.bip.net>
cc: www-style@w3.org
Message-ID: <Pine.LNX.4.05.10208072154050.22364-100000@jfouffa.inria.fr>

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

> 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 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:03 UTC