On Wed, Jun 4, 2008 at 8:01 AM, John Horner <[EMAIL PROTECTED]> wrote:
> I've just spent a bit of time looking at how background-position works
> when expressed as a percentage:
>
>  background-position: 90%;
>
> and I'm wondering why it works the way it does.
>
> Here's the best way I can describe the effect of (90%, x-axis)
> positioning with percentages: "to position the image such that the point
> 90% across the image is aligned with the point 90% across the element".
Have you read specs?
http://www.w3.org/TR/CSS21/colors.html#propdef-background-position

> There's something rather counter-intuitive about that (it's even hard to
> describe!), and I've tried to explain it in teaching people about CSS
> and found that people are rather baffled by it.
>
> Does anyone know why it was created that way, and/or can you tell me if
> there's some very useful thing this rule allows you to do? That is, as
> opposed to a simpler rule like "image is offset that amount to the left"
> which is what I assumed when I first came across it.
Can you provide other way to align right edge of background image
with right edge of box? To center background image?

-- 
Алексей

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to