W3C home > Mailing lists > Public > www-style@w3.org > June 1999

Re: Resized background image

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Sun, 6 Jun 1999 11:20:43 +0100 (BST)
To: Oren Ben-Kiki <oren@capella.co.il>
cc: Style Sheet mailing list <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9906061104440.2495-100000@ss1.bath.ac.uk>
On Sun, 6 Jun 1999, Oren Ben-Kiki wrote:

> We've already got background-position, so having a background-size
> attribute doesn't seem out of place. How about adding it to CSS3?

This has already been suggested. See:

   http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle.html#stretchbg


> Another question: suppose that a background-position is specified
> together with a repeat in the same axis, for example:
> 
> background-position: 50% 0%;
> background-repeat: repeat-x;
> 
> Should the background image cover only half the element (the right
> one), or should it cover it all?

All of it.


> IMO controlling the position of the tiling boundary while covering
> the whole element is more important/useful/intuitive then covering
> just a part of the element, but the CSS2 specifications aren't clear
> on this.

Actually, they are quite clear. From CSS2 section 14.2.1:

# All tiling covers the content and padding areas of a box.

And later:

# Example(s):
# 
# BODY {
#   background: white url("pendant.gif");
#   background-repeat: repeat-y;
#   background-position: center;
# }
# 
# One copy of the background image is centered, and other copies are put above
# and below it to make a vertical band behind the element.


> IE4 implements this as partial element cover, but that doesn't prove
> a thing :-)

It proves its non-compliant. I believe IE5 fixes this (?).


If you _want_ half-only backgrounds, look at Eric Meyer's suggestion:

   http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle.html#halfbg

Also, note that 'background-position' does not currently apply to
inline elements. It has been suggested this be changed:

   http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle.html#bg-pos

-- 
Ian Hickson
: Is your JavaScript ready for Nav5 and IE5?
: Get the latest JavaScript client sniffer at 
: http://developer.netscape.com/docs/examples/javascript/browser_type.html
Received on Sunday, 6 June 1999 06:20:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:59 GMT