Closed
Bug 195622
Opened 21 years ago
Closed 21 years ago
background colour of XHTML page not rendered correctly under certain circumstances
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 147856
People
(Reporter: mozbugs, Unassigned)
References
()
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212 Depending on the document type declaration etc. (see below) of an XHTML 1.1 page, Mozilla does not render the page's background colour correctly. Precisely, the background colour does not fill the page's margin, and in the case of a page that takes up only part of one screen, the background colour only extends to the end of the page's contents instead of to the bottom of the browser window, too. This happens in the case of an XHTML page contained in an XML file, sent with Content-Type: text/xml and beginning thusly: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> On the other hand, a HTML file, sent as Content-Type: text/html and beginning as follows will work: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> This has been confirmed with Mozilla 1.3a (1.3b is, unfortunately, too unstable for me to use). Reproducible: Always Steps to Reproduce: 1. Load http://gl00on.net/moz1.xml Actual Results: See above. Expected Results: See http://gl00on.net/moz1a.html for the expected results.
As an additional note, both pages are valid XHTML 1.1 according to the W3C's validator service.
Comment 4•21 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030228 WFM
Comment 5•21 years ago
|
||
This is the proper rendering. As an XML doc the body is simply a block element inside the html element. As such its affected by margins & padding, etc. & the hieght of the viewport has no impact on its height. the bug is invalid, but i'm sure there's a bug with a better explanation to dupe this to...
Thanks for your help, Chris. What would be the proper way to ensure that the XML document is rendered the same way as the HTML variant?
Comment 7•21 years ago
|
||
In short, style the <html> element, not <body>. See bug 147856 and bug 90356 for more info. Just as a general note, remember that anything served as text/html is processed as HTML, even if it really is XHTML (the file type has precedence). This can cause some interesting, although completely correct, behavior. *** This bug has been marked as a duplicate of 147856 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•