Explorer ignores closing </li> tags

Internet Explorer on Windows completely ignores closing LI tags.

This means that if the list item contains a block level link, the blank space after the LI will be rendered as a blank line.

It also means that if elements are nested within the list, but not within a LI (this is invalid HTML, but people still do it), IE will treat them as if they are in the preceding LI. This modifies both the DOM and the response to CSS.

Test page Workaround is included
Reported by: TarquinWJ.

Explorer 5-6 Windows | Reported on 17 January 2005.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.




Search reports by browser:

Atom RSS

Comments

(Add your own)

1 Posted by Geoff Moller on 17 January 2005 | Permalink

Found this out the hard way last week. Was writing a PHP script to recursively iterate through some media directories, and generate nested lists and list items per the directory structure. The way it stood, I wouldn't have to class anything, just let the css cascade everything. But then the bug crept in - what a waste of time.

2 Posted by Jake Archibald on 5 May 2005 | Permalink

Setting height:1%; on the links fixes this in internet explorer.

So

* html ... a {
height: 1%;
}

where '...' is a reference to the ul &/ li the link is within.

3 Posted by Wiktor on 13 December 2005 | Permalink

I set
border-bottom: 1px solid blue
on the li element and works for me... Strange...