W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [CSS21] "background-position: top center" and "margin: 0 auto"

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 26 Sep 2006 14:44:33 +1200
Message-ID: <45189411.907@inkedblade.net>
To: www-style@w3.org

Ognyan Kulev wrote:
> Hi,
> 
> I have a design with one centered column, so it uses "margin: 0 auto".
> Now I want when the page is shorter than browser's window, the column to
> continue with specific background. So I added the following, with the
> idea that the background image will continue the column:
> 
> body {
>   background: <color> url(<image-url>) repeat-y top center;
> }
> 
> The problem is that it works as intended only in Opera 9. Firefox 2.0
> RC1 and IE 6 both move the background image to right with one pixel
> which is ugly.
> 
> My wish is that it's somewhat specified in CSS 2.1 that "margin: 0 auto"
> and "background-position: top center" align exactly the same.

I think this is probably a rounding error in FF and IE, not a problem
with the specification.

~fantasai
Received on Tuesday, 26 September 2006 02:45:00 GMT

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