Closed Bug 446013 Opened 16 years ago Closed 16 years ago

Centered content over centered background is shifted one pixel

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 446284

People

(Reporter: rafi, Unassigned)

References

()

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

When centering content over a centered body-background (classic "shadow" layout) the content is sometinmes shifted one pixel to the right.



Reproducible: Always

Steps to Reproduce:
1. Create a webpage with a background-properties of position: center top;
2. add content in a div with fixed width (width: 500px) and centered position (margin: 0 auto;)
3.Open the page and change your windows size by dragging the lower right corner SLOWLY.
Actual Results:  
The position of the div relative to the background shifts one pixel to the right. 

Expected Results:  
Position of div relative to background should always be the same since both elements are centered on the page.

Background image has an even width in px (multiple of 2)
Content-container has an even width in px (multiple of 2)
Same Problem here: http://smv.hornweb.ch

It's shifted when the window-width is an odd number, with even numbers it's ok. So I guess firefox rounds differently when centering a background or a <div>. It was ok till at least firefox 3.0b5, maybe even till RC1.



Flags: blocking-firefox3.1?
I forgot to mention that I'm using Ubuntu Linux, so it's not a windows-related bug
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Component: General → Layout
Flags: blocking-firefox3.1?
OS: Windows XP → All
Product: Firefox → Core
Hardware: PC → All
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.