<LINK> to style sheet fails to style <A> properly




19 years ago
19 years ago


(Reporter: bugzilla, Assigned: clayton)



Firefox Tracking Flags

(Not tracked)



(3 attachments)



19 years ago
The following html will display a grey link which on mouse over will turn
orange. if the same style sheet is linked instead of inline then the link
appears blue and the mouse-over link uses a different font
(linked using : <LINK REL=stylesheet HREF="test.css" TYPE="text/css">)
The linked style sheet works fine on Netscape & IE


<style type="text/css">
    A:link,A:visited        {font-family:sans-serif;text-decoration:underline;
 A:hover,A:active       {font-family:sans-serif;text-decoration:underline;

<body bgcolor="#FFFFFF" leftmargin=0 topmargin=0>
<a href="http://www.mozilla.org">Browsers</a>

Comment 1

19 years ago
seems to work for me? what build are you using. Also could you attach the source
to the two pages you use for the linked version?? (If build is more than a few
weeks old, try a new build first, ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/

Comment 2

19 years ago
how does the test.css look like ? 

Comment 3

19 years ago
Created attachment 11399 [details]
CSS file for this test case

Comment 4

19 years ago
Created attachment 11400 [details]
HTML file which links to the CSS file

Comment 5

19 years ago
Created attachment 11401 [details]
Gif screenshot of mozilla - link shown is blue, should be grey. mouse over is purple,should be orange.

Comment 6

19 years ago
remove the following from test.css

<style type="text/css">


a linked stylesheet should not have those definitions. without those lines it 
works correctly in mozilla. i would say this is a wont fix bug.

Comment 7

19 years ago
It may be fair to ignore this aspect, since I did suspect that they definition 
of the css file was suspect - however, where should this lie with regards to 
compatibility with NS4 and IE? The offending code snippet was taken from a 
10,000 users intranet project. While we will of course rectify the style sheet 
file, this aspect remains an incompatibility (then again, is it simply an 
improvement in the name of progress?)
Changing component to Style System and marking INVALID.  The <style> and
</style> should not be in an external CSS file and should cause the rule
following them to be ignored since they are part of the selector for that rule. 
The <!-- and --> are valid there (but unnecessary).  I think changes like this
need to be made for progress - it won't hurt any browsers if people remove HTML
markup from their external CSS, and it's easy to do.  I also don't think it's
that common.
Last Resolved: 19 years ago
Component: Layout → Style System
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.