Closed Bug 272804 Opened 20 years ago Closed 20 years ago

XHTML+CSS background color rendering differs from (correct) HTML

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: mozilla, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122 Build Identifier: Mozilla 1.7.3; Mozilla 1.8a5 Use these 2 files: backgr.xhtml: ========================================= <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XML DTD and Schema Import</title> <link type="text/css" rel="StyleSheet" href="backgr.css" /> </head> <body> <p>ALL background must be colored, not white</p> </body></html> backgr.css: ========================================= body { background-color:yellow; } Reproducible: Always Steps to Reproduce: 1. Open backgr.xhtml (using backgr.css) with Mozilla. Observe background rendering 2. Rename backgr.xhtml to backgr.xml and do the same 3. Rename backgr.xhtml to backgr.html and do the same Actual Results: Cases (1) and (2) (XHTML) render yellow background inside paragraph and white around. I don't see any way to get rid of this yellow. Case (3) (HTML) renders ALL background in yellow, that is correct Expected Results: Rendering for all 3 steps must be identical: ALL the background must be in yellow
This is correct rendering. In XHTML, put the background on the HTML element to get the effect you want.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Verified. Please see http://www.w3.org/TR/CSS21/colors.html#q2 paragraph 4, especially the "This does not apply to XHTML documents" part.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.