Closed Bug 147856 Opened 22 years ago Closed 22 years ago

with application/xhtml+xml, body does not cover the whole screen

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: supermario, Assigned: attinasi)

References

()

Details

I have two sites with the same content.

  http://www.ego4u.de/test/pog1/body.xhtml

  http://www.ego4u.de/test/pog2/body.xhtml

Both are XHTML1.1 documents and they have a colored body element. pog1 has
Content-type text/html and the complete background is colored. pog2 is delivered
with application/xhtml+xml and only the part with content is colored.

I think this is a bug in the xhtml renderer. It's possible, that the bug is
connected with Bug#:111514
Not sure if this is bug 111514, but I see the problem with Linux.

pi
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
<body> never covers the whole screen -- put a border on it to see that.  In 
HTML (_not_ XHTML) it is recommended by CSS2 that the body background be 
propagated to the root element (which is <html>) so that it will cover the 
whole canvas as it does in legacy browsers.

If you want your background to cover the whole canvas, set it on your root 
element, not on some random child.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Please, can you descibe me why the css2 specs recommend that authors specify the
background for the BODY element rather than the HTML element?

http://www.w3.org/TR/REC-CSS2/colors.html#q2
For backwards compatibility with user-agents which do not implement that part 
of the specification correctly (NS4, IE5/Windows, IE5.5/Windows, etc).  Also, 
that is for HTML, not XHTML.  If you try serving your XHTML as text/html (so 
it's treated as an HTML document) you will see that the background is 
propagated as expected.

In practice, setting the background on both <html> and <body> is a good idea.
*** Bug 195622 has been marked as a duplicate of this bug. ***
*** Bug 297576 has been marked as a duplicate of this bug. ***
*** Bug 344025 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.