Last Comment Bug 241594 - <a name="" /> causes bad CSS interpretation, but <a name=""></a> works - see attached example
: <a name="" /> causes bad CSS interpretation, but <a name=""></a> works - see ...
Status: RESOLVED DUPLICATE of bug 225323
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: David Baron :dbaron: ⌚️UTC-7 (busy September 14-25)
: Hixie (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-24 14:34 PDT by Ryan Holliday
Modified: 2004-04-24 14:44 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
This HTML & CSS demonstrate the problem. (763 bytes, application/x-zip-compressed)
2004-04-24 14:35 PDT, Ryan Holliday
no flags Details
[CORECTED] HTML & CSS to Demonstrate the Problem (744 bytes, application/x-zip-compressed)
2004-04-24 14:44 PDT, Ryan Holliday
no flags Details

Description Ryan Holliday 2004-04-24 14:34:33 PDT
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.
Comment 1 Ryan Holliday 2004-04-24 14:35:39 PDT
Created attachment 146940 [details]
This HTML & CSS demonstrate the problem.

HTML & CSS file to demonstrate the bug.
Comment 2 Bill Mason 2004-04-24 14:40:26 PDT
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 ***
Comment 3 Ryan Holliday 2004-04-24 14:44:35 PDT
Created attachment 146942 [details]
[CORECTED] HTML & CSS to Demonstrate the Problem

Sorry, the last attachment got mangled by trying to a "Save Page As".  This one
should be correct.

Note You need to log in before you can comment on or make changes to this bug.