Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 446284 - Wrong display of centered background image when the the browser window is resized
: Wrong display of centered background image when the the browser window is res...
: fixed1.9.1, regression, testcase
Product: Core
Classification: Components
Component: Layout (show other bugs)
: unspecified
: All All
: P2 major with 5 votes (vote)
: ---
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
: Jet Villegas (:jet)
: 446013 446194 451892 457415 (view as bug list)
Depends on: 458487
Blocks: 433640
  Show dependency treegraph
Reported: 2008-07-20 06:57 PDT by Francesco Lodolo [:flod]
Modified: 2009-06-15 15:21 PDT (History)
24 users (show)
roc: blocking1.9.1+
samuel.sidler+old: blocking1.9.0.2-
samuel.sidler+old: wanted1.9.0.x+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

background image needed for testcase (164 bytes, image/png)
2008-08-05 18:28 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details
testcase, attached to the bug (911 bytes, text/html)
2008-08-05 18:29 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details
testcase 2 (597 bytes, text/html)
2008-08-13 12:17 PDT, j.j.
no flags Details

Description Francesco Lodolo [:flod] 2008-07-20 06:57:44 PDT
Test case:

a) Centered background image, black with a white content area of 800px
b) A centered div with position:relative; and width: 800px;
c) A div with position: absolute; and left: 0px;

The last div should be always displayed on the left margin of the content area, but if you resize the window you will see a 1px gap on the left, depending on the width of the browser window.

It seems a problem with the position of the background image, since the page without images works fine (see

Verified with Firefox 3.0.1, both on Mac OS X and Windows XP Pro sp2
Comment 1 philippe (part-time) 2008-07-20 07:42:48 PDT
Gecko/2008060402 Minefield/3.1a1pre
Gecko/2008070104 GranParadiso/3.0.1pre
Gecko/2008060302 Minefield/3.1a1pre
Gecko/2008063004 GranParadiso/3.0.1pre
Both cases, when bug 433640 landed on trunk (mozilla-central) and 1.9.0 branch
Comment 2 Kai Liu 2008-07-22 09:27:35 PDT
*** Bug 446013 has been marked as a duplicate of this bug. ***
Comment 3 Kai Liu 2008-07-22 09:37:00 PDT
*** Bug 446194 has been marked as a duplicate of this bug. ***
Comment 4 Martijn Wargers [:mwargers] (not working for Mozilla) 2008-08-05 18:28:28 PDT
Created attachment 332473 [details]
background image needed for testcase
Comment 5 Martijn Wargers [:mwargers] (not working for Mozilla) 2008-08-05 18:29:23 PDT
Created attachment 332474 [details]
testcase, attached to the bug
Comment 6 j.j. 2008-08-13 12:17:13 PDT
Created attachment 333606 [details]
testcase 2

Slightly different testcase.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080809033929 Minefield/3.1a2pre

Shows sometimes an 1px gap between black and orange, but no overlap.
Opera 9.5 and Safari have sometimes overlap, but never a gap.
Fx2 and IE7 always do it "right".
Comment 7 j.j. 2008-08-13 12:21:58 PDT
Sorry, Firefox 3.0.1 and 3.1a2pre has both, gap *and* overlap
Comment 8 j.j. 2008-08-13 12:39:59 PDT

/* left: 0px; */ left: -0.1px

btw, I see different behaviour locally and online (comment 6 vs. comment 7) 
Comment 9 Samuel Sidler (old account; do not CC) 2008-08-14 17:46:30 PDT
Not blocking but wanted. dbaron or roc, who can own this?
Comment 10 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-08-14 18:04:34 PDT
Guess I'll take it
Comment 11 philippe (part-time) 2008-08-23 16:49:38 PDT
*** Bug 451892 has been marked as a duplicate of this bug. ***
Comment 12 Anthony Grace 2008-09-11 11:53:36 PDT
I'm not sure how the bug resolution process works guys, but can anyone give an estimate of when this will be fixed? Thanks :-)
Comment 13 Richard 2008-09-25 08:57:40 PDT

I have created a number of website and this issue now occurs on most of them when using firefox 3.0.1 and 3.0.2, any version of firefox before this is fine. All other browsers including IE5/6/7/8beta, opera, safari and chrome are also fine.

I have tried a number of work arounds but they dont seem to work. Please can you fix this issue asap.

Thank you.
Comment 14 philippe (part-time) 2008-09-27 05:57:12 PDT
*** Bug 457415 has been marked as a duplicate of this bug. ***
Comment 15 Matarua 2008-10-21 18:58:43 PDT
There also seems to be an issue that when a background image is placed in the body: <body background="images/main_back.gif"> for example, old school style I know, but a tiling background of the most simple type now has a vertical rounding error when resizing the browser - not just horizontal.

This is a major flaw if you have a one pixel border defined as a background as it disappears completely.

If you could look at this Robert, that would be great, also looking forward to all the .1 updates you gave us the brief on, cheers, M@
Comment 16 Joshwa 2008-10-29 18:49:54 PDT
I use a large background image aligned with CSS to be in the Top Center.  On different pages on a site I work on, the background image appears to shift at least 3 pixels to the left.  This problem does not occur when I test it in Internet Explorer, just my beloved Firefox.

I will leave my sample sites up for awhile if someone wants to see it.  A good way to see that the background definitely moves is to have at least 2 tabs open.

   Note the position of the blue table.
2) Click on the photo for An Aria, or you can also go to
The background image definitely shifts several pixels to the left :-\
Comment 17 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-11-06 18:41:01 PST
Seems to have been fixed by bug 458487.
Comment 18 slobjones 2008-11-06 21:17:30 PST
Somebody claims it's fixed, so you assume it's been fixed?

How about showing us that it's been fixed? Or at least indicating when we'll see an update of Firefox that corrects the background image shift?
Comment 19 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-11-06 23:51:12 PST
I tested it myself. You can test it yourself in tonight's nightly build (and Firefox 3.1beta2, when that's released).
Comment 20 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-11-06 23:51:35 PST
Actually last night's nightly build should contain the fix, so you can test it right now.
Comment 21 Jason 2008-12-04 12:35:59 PST
This bug isn't fixed.  The original test case link at the top of this page still shows a 1px shift in the background for different window sizes.  Click the link, and slowly change the width of your browser.  It appears to move back and forth 1px.
Comment 22 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-12-04 14:36:55 PST
WFM on Mac. What platform are you on?
Comment 23 Jason 2008-12-05 06:36:08 PST
Windows XP Pro, with FireFox 3.0.4
Comment 24 Ryan VanderMeulen [:RyanVM] 2008-12-05 07:01:11 PST
Jason, this was fixed for the Firefox 3.1.x releases, not 3.0.x releases. To verify the fix, you need to try either a 3.1 nightly build (or the upcoming official 3.1b2 release) or a mozilla-central nightly build.
Comment 25 Chris Patterson 2008-12-05 08:29:46 PST
I can confirm that this is fixed on the current nightly (Version 3.2.a1pre) on OSX.

Funny, as I finally isolated this and implemented a fix for one of our sites.

This means that bug 254214 can be marked as a dupe and closed, as well.
Comment 26 Aakash Desai [:aakashd] 2009-04-07 12:05:03 PDT
On builds: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090406 Minefield/3.6a1pre (.NET CLR 3.5.30729) ID:20090406045355


Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090331 Shiretoko/3.5b4pre (.NET CLR 3.5.30729) ID:20090331041754

I'm still seeing a shift to the left when the window is resized to the point that the black background image is not on the screen.
Comment 27 Falconer 2009-06-15 10:09:41 PDT
This bug is -not- resolved, I am looking at it as we speak.

Background image moves up 1 pixel.

The html/css works fine in Firefox 2, IE6, IE7, IE8. I wouldn't have noticed if I hadn't upgraded from 2.0 (after I downgraded a couple of months ago) last weekend.
Comment 28 Robert O'Callahan (:roc) (email my personal email if necessary) 2009-06-15 15:21:59 PDT
It's not fixed in Firefox 3. It's fixed in Firefox 3.5.

Note You need to log in before you can comment on or make changes to this bug.