Closed Bug 219565 Opened 21 years ago Closed 21 years ago

Layout of a list under a heading results in first item looking incorrect.

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
trivial

Tracking

()

VERIFIED DUPLICATE of bug 100930

People

(Reporter: gary, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624

If a list directly follows a heading (tested with or without CSS in XHTML valid
code) then the items are displayed incorrectly. For example

<h1>Yo</h1>
<ul><li>Umm</li><li>Arr</li></ul>

Will render something like:

Yo
*
  Umm
* Arr

Inserting a paragraph in between will show correctly.

Reproducible: Always

Steps to Reproduce:
1. Create web page with heading (any level) directly followed by a list.
2. View web page.
3.

Actual Results:  
First item is layed out incorrectly such as.

HI
*
  Yo
* Choo

Expected Results:  
HI
* Yo
* Choo
From the URL:

<ul><a name="creation">	<li></li></a>

You should move the <a> inside the <li>

*** This bug has been marked as a duplicate of 100930 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
... and the </a> too, if that wasn't clear.
Attached file reporter's testcase
worksforme with linux trunk 20030916 and 1.4
It was related to, as mentioned, to Bug #100930 (sorry that I never found the
duplicate). And my listed test code was off as an <a href="">Bleh</a> must exist
for the issue to be recreatable. The HTML itself was sound however (<ul><a
name="creation"><li></li></a> was in fact <h2><a href="creation"/>Links</h2>,
all tags are correctly ordered, confirmed by the W3C validator).
> The HTML itself was sound however 

The reason the validator treats this HTML as valid is that the validator sees

  <a href="creation"/>

as exactly equivalent to

  <a href="creation"></a>&gt;

which is what the HTML spec says it means.  I suspect you would be pretty upset
if browsers actually followed the spec here, though, since it would make a
random '>' character appear in your text.

So the parser does not support NET (which is this business of closing a tag with
'/' in HTML), and then the <a> is not closed and fun ensues.

Now if this were an XML document then the <a> would be properly closed (since in
XML "/>" closes a tag, unlike in HTML where '/' closes a tag), but it's not an
XML document.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: