Closed Bug 241594 Opened 21 years ago Closed 21 years ago

<a name="" /> causes bad CSS interpretation, but <a name=""></a> works - see attached example

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 225323

People

(Reporter: phidipides2, Assigned: dbaron)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 I have a stylesheet containing the following: #bug { margin: 5px 0 5px 0; } #bug .bug-item { border: 1px solid black; } #bug .bug-item a { color: blue; } The following HTML code will display text that should be black using the "#bug .bug-item a" rules: <div id="bug"> <a name="buggy" /> <div class="bug-item"> <p>black black black <a href="http://www.mozilla.org/">blue</a> black black black.</p> </div> </div> Changing "<a name="buggy" />" to "<a name="buggy"></a>" fixes the problem. Sample HTML and CSS file attached. Reproducible: Always Steps to Reproduce: View the attached file. The text "black" should be black, but it is rendered as blue. Changing "<a name="name" />" to "<a name="name"></a>" fixes the problem. Actual Results: Text is blue. Expected Results: Text should be black.
HTML & CSS file to demonstrate the bug.
You can't use that syntax when writing XHTML and serving it as text/html. See bug 225323 comment 5. *** This bug has been marked as a duplicate of 225323 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Sorry, the last attachment got mangled by trying to a "Save Page As". This one should be correct.
Attachment #146940 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: