W3C home > Mailing lists > Public > www-style@w3.org > March 1998

Re: IE, NN and background-position: thpppt!

From: Stephanos Piperoglou <sp249@cam.ac.uk>
Date: Wed, 11 Mar 1998 17:35:38 +0000 (GMT)
To: Todd Fahrner <fahrner@pobox.com>
cc: David Perrell <davidp@earthlink.net>, Style <www-style@w3.org>
Message-ID: <Pine.LNX.3.96.980311173313.18640E-100000@teatime.joh.cam.ac.uk>
On Tue, 10 Mar 1998, Todd Fahrner wrote:

> Suppose the repeating background image is 72 pixels square, showing a piece
> of your favorite fruit. And suppose you've got 36 pixels of padding on your
> element. If the point of origin for the tile is not the outer padding
> boundary, then the fruit in the padding area will be chopped in half, any
> way you slice it. Unless you were to set the initial position to -36px,
> which is a bit ugly as it merely inverts another figure in the rule. So I
> still think the current implementation is more useful than the spec, and
> suggest that the CSS2 spec be amended, with perhaps an explanatory note
> being attached to the CSS1 spec if that's not too dicey.

I assume (I haven't checked) that the BODY has a default margin, but has
padding set to 0. So this behaviour is consistent. And don't forget that
padding goes OUTSIDE a border, so this also makes sense. If you create an
element with padding, border, margin and background image, you expect the
image to be contained within the border. (if you don't, enclose it in a
parent element with appropriate background and make it transparent).. So I
think there's no mistake in the spec.

Now the implementations by IE and NN is an ENTIRELY different story.

-- Stephanos Piperoglou -- sp249@cam.ac.uk -------------------
All I want is a little love and a lot of money. In that order.
------------------------- http://www.thor.cam.ac.uk/~sp249/ --
Received on Wednesday, 11 March 1998 12:39:22 GMT

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