Re: Resized background image

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:

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

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

Ian Hickson
: Is your JavaScript ready for Nav5 and IE5?
: Get the latest JavaScript client sniffer at 

Received on Sunday, 6 June 1999 06:20:48 UTC