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

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

From: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
Date: Sun, 24 Sep 2006 09:59:21 +0300
Message-ID: <45162CC9.6010808@fmi.uni-sofia.bg>
To: www-style@w3.org

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.

Regards,
ogi
Received on Sunday, 24 September 2006 06:59:42 GMT

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