Closed Bug 51538 Opened 25 years ago Closed 25 years ago

external CS with background-color for "body" ignored

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: dkarr, Assigned: pierre)

Details

From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (WinNT; U) BuildID: 2000090604 I have a CSS that sets the background-color for "body", and also the background-color for "h1" and also for "th". The last two work, but the bgcolor for "body" has no effect. It works in Netscape 4.7x. Reproducible: Always Steps to Reproduce: 1. Put "colortest.html" and "colortest.css" in same directory 2. View colortest.html in browser Actual Results: The background color of the page is white. Expected Results: The background color of the page should be red. colortest.css: ------------------- <STYLE TYPE="text/css"> <!-- body { background-color: #FF0000 } A:hover { color: red } H1 { color: #440000; text-align: center; font-family: Arial Black, Arial, Helvetica, sans-serif} TH.TITLE { background-color: #EF8429; font-size: 28px; font-family: Arial, Helvetica, sans-serif;} --> </STYLE> ------------------- colortest.html: ------------------- <!-- -*- HTML -*- --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Page Title</title> <link rel="stylesheet" href="colortest.css" type="text/css" /> </head> <body> <table border="5" align="center"> <tr><th class="TITLE">Page Title</th></tr> </table> </body> </html> -------------------
Closed as Invalid. HTML tags and comments are illegal in LINKed stylesheets. Change colortest.css to the following and it will work: colortest.css: ------------------- body { background-color: #FF0000 } A:hover { color: red } H1 { color: #440000; text-align: center; font-family: "Arial Black", Arial, Helvetica, sans-serif} TH.TITLE { background-color: #EF8429; font-size: 28px; font-family: Arial, Helvetica, sans-serif;} ------------------- Note that font family names containing spaces should be quoted (see http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-family)
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Verifying bug invalid.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.