[Webkit-unassigned] [Bug 28607] Body background color isn't drawn at bottom of page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 26 11:55:11 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=28607


Will Glynn <will at lerfjhax.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |will at lerfjhax.com




--- Comment #10 from Will Glynn <will at lerfjhax.com>  2010-04-26 11:55:11 PST ---
I've noticed this issue for a long time, on a wide array of websites, and
didn't think much about it. However, it began to irritate me on a new website
I've spent a lot of time with. I trial-and-errored a while (a pain, given the
non-determinism of this bug) and eventually discovered a workaround. Rather
than:

body {
    background-color: #444;
}

Say:

html, body {
    background-color: #444;
}

Adding this declaration seems to make this problem disappear in existing
releases of Chrome and Safari, and I've found no negative effects in Webkit or
other browsers thus far.


CSS 2.1 confirms that styling "body" is the recommended approach, and indicates
that background handling of "body" within "html" is a special case, possibly
hinting at the root of this issue:

For HTML documents, however, we recommend that authors specify the background
for the BODY element rather than the HTML element. For documents whose root
element is an HTML "HTML" element or an XHTML "html" element that has computed
values of 'transparent' for 'background-color' and 'none' for
'background-image', user agents must instead use the computed value of the
background properties from that element's first HTML "BODY" element or XHTML
"body" element child when painting backgrounds for the canvas, and must not
paint a background for that child element. [1]

CSS3 agrees, though with slightly different wording. [2]

[1] http://www.w3.org/TR/CSS21/colors.html#background
[2] http://www.w3.org/TR/css3-background/#special-backgrounds

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list