Closed Bug 285183 Opened 20 years ago Closed 20 years ago

Centered background image on <body> renders in the wrong location

Categories

(Core :: Layout, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sfraser_bugs, Unassigned)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

If the body tag has style that assigns a centered background-image, the image
renders in the wrong location if the body is narrower than the width of the image.

This is obvious on http://www.macworld.com if you make the window narrow.

This happens on the trunk, but not on the branch.
When testing, note that scrollbars appear, but the image is rendered in the
wrong location.
Hmm... The canvas background (which is what we're looking at here) is always
anchored relative to the root element in our code (that being the <html> in this
case), even if it came from the <body> (per
http://www.w3.org/TR/CSS21/colors.html#q2 paragraph 4).

The spec doesn't actually say whether it should be anchored to the <body> (but
painted on the canvas) in this case, that I can see.  It probably should.

The reason this works on branch is that on branch the root element's box is the
wrong size, of course.  See bug 241694 for the patch that fixed that.
Invalid. Set a background (e.g. "white") on the html element to get the effect
you want.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Blocks: 319729
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: