W3C home > Mailing lists > Public > www-style@w3.org > May 2008

Re: [css3-background] alternatives to background-origin

From: Alan Gresley <alan@css-class.com>
Date: Wed, 21 May 2008 14:06:00 +1000
Message-ID: <48339FA8.9010604@css-class.com>
To: Alan Gresley <alan@css-class.com>
CC: Bert Bos <bert@w3.org>, www-style@w3.org

Alan Gresley wrote:

> Then authors could just write:
> 
> 
> background-position: 0 auto auto 0; /* left top right bottom */
> background-origin: content;
> 
> 
> And to clipped the top and left of the image all one needs to do is:
> 
> 
> background-position: -100px auto auto -100px;
> 
> 
> This would position the background image outside the content box, thus 
> clipping the top and left portion of the image by 100px.


That should have been.


Then authors could just write:


background-position: 0 0 auto auto; /* left top right bottom */
background-origin: content;


And to clipped the top and left of the image at the content edge all you 
  do is give the background-position-left and background-position-top 
negative values:


background-position: -100px -100px auto auto;
background-origin: content;


This would position the left and top edge of a background image outside 
the content box, thus clipping the top and left portion of the image by 
100px.


Alan
Received on Wednesday, 21 May 2008 04:06:53 GMT

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