Closed
Bug 147436
Opened 23 years ago
Closed 23 years ago
Background isn't filled over the full background using XHTML interpreter
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: spheredancer, Assigned: jst)
References
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.0rc3) Gecko/20020523
BuildID: 2002052306
Hello,
I hope I don't post a bug which is already known, I didn't find it already, but
who know.
If I create a XHTML Page (W3C validated) which is using the *.XHTML ending (to
prevent, that the browser use the HTML interpreter), the CSS background color
tag background-color doesn't work correctly, the background is only filled in
used part of the screen for example a page which is only filled half with text,
has in the text region (and left and right of it) the correct defined background
color, but outside of this region only the standard background color. I didn't
found a workaround so a fix would be helpful ;-)
Reproducible: Always
Steps to Reproduce:
1.Create a valid XHTML document with xhtml ending, use as forced style sheets
for background definition.
Actual Results: The background is only filled in "used" regions. It's the same
result if you use background graphics
Expected Results: Filling the complete screen background
foo.css
______________________________________________________________________
body
{
color:#FF0000;
background-color:#00FF00;
}
______________________________________________________________________
foo.xhtml
______________________________________________________________________
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<!-- As there are many deprecated commands and attributes, CSS ist used
for format operations/-->
<link rel="stylesheet" href="foo.css" type="text/css" />
</head>
<body>
<div>
Here is color, and nowhere else
</div>
</body>
</html>
Comment 1•23 years ago
|
||
This is correct rendering for XHTML. The root element is <html>, not <body>.
It sounds like you want to set the background on <html>.
See http://www.w3.org/TR/REC-CSS2/colors.html#q2:
The background of the box generated by the root element covers the entire
canvas.
For HTML documents, however, we recommend that authors specify the background
for the BODY element rather than the HTML element. User agents should observe
the following precedence rules to fill in the background: if the value of the
'background' property for the HTML element is different from 'transparent' then
use it, else use the value of the 'background' property for the BODY element.
If the resulting value is 'transparent', the rendering is undefined.
In other words, for HTML documents the <body> background is propagated to the
canvas. For XHTML it is not, correctly.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Updated•23 years ago
|
QA Contact: desale → stummala
Comment 3•21 years ago
|
||
*** Bug 268537 has been marked as a duplicate of this bug. ***
Comment 4•20 years ago
|
||
*** Bug 228060 has been marked as a duplicate of this bug. ***
Component: DOM: HTML → Style System (CSS)
Comment 5•20 years ago
|
||
*** Bug 318745 has been marked as a duplicate of this bug. ***
Comment 6•20 years ago
|
||
*** Bug 284412 has been marked as a duplicate of this bug. ***
Comment 7•19 years ago
|
||
*** Bug 347943 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.
Description
•