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

VERIFIED DUPLICATE of bug 100930

Status

()

--
trivial
VERIFIED DUPLICATE of bug 100930
15 years ago
15 years ago

People

(Reporter: gary, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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

Comment 1

15 years ago
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
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 2

15 years ago
... and the </a> too, if that wasn't clear.

Comment 3

15 years ago
Created attachment 131672 [details]
reporter's testcase

worksforme with linux trunk 20030916 and 1.4
(Reporter)

Comment 4

15 years ago
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.