Closed
Bug 264163
Opened 20 years ago
Closed 20 years ago
First CSS rule of a linked stylesheet is ignored
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 149466
People
(Reporter: Stephane.Gobance, Assigned: dbaron)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
When I link my HTML page with a CSS (<LINK type="text/css" rel="stylesheet"...),
the first rule of my stylesheet is ignored and the rendering is not proper as I
want!
Reproducible: Always
Steps to Reproduce:
1. Create a simple HTML page like this one:
<html>
<head>
<title>CSS implementation test in Mozilla</title>
<link type="text/css" rel="stylesheet" href="test.css">
</head>
<body>
<p>Is the background colored with the CSS "background-color" property ?</p>
</body>
</html>
2. Create a simple CSS like this:
<style>
<!--
BODY { background-color: rgb(170,200,250) }
-->
</style>
3. Open the HTML page in the browser and you'll see that the bacground color is
not filled at all.
Actual Results:
The background color (specified in the stylesheet) is not rendered at all
(completely ignored).
Expected Results:
The background color should be filled with the one specified in the stylesheet.
I have found a workaround to this bug which consists in adding a first empty
rule in the linked CSS file:
<style>
<!--
.mozillabug {}
BODY { background-color: rgb(170,200,250) }
</style>
Then, opening the HTML page in the browser works properly.
I have noticed that the problem also occurs with FireFox !
Comment 1•20 years ago
|
||
*** This bug has been marked as a duplicate of 149466 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Comment 2•20 years ago
|
||
vrfy. to be clear: this is not a bug. remove these lines from the css file: <style> <!--
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 3•20 years ago
|
||
Sorry, I had forgotten to remove the comments tags in the CSS file I provided !
However, I had also tested the CSS file without any comment tags and the problem
still occured.
My CSS file called "test.css" is as simple as this:
<style>
BODY { background-color: rgb(170,200,250) }
</style>
Try again the test and you'll that nothing has been solved.
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
| Reporter | ||
Comment 4•20 years ago
|
||
Sorry but I read too quickly and missed to remove the <style> </style> tags. I have removed all HTML stuff and everything works now. I made the same mistake as Robert Burtcher (vipir14@cox.net) by reading erroneous tutorials about CSS on the web. *** This bug has been marked as a duplicate of 149466 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → DUPLICATE
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•