Closed Bug 165047 Opened 22 years ago Closed 22 years ago

List Items inside of links do not display A:hover style.

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 146409

People

(Reporter: mozilla, Assigned: attinasi)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 Honestly, the summary says it all. If i hover on a list-item which is inside a link, it ignore the hover style completely. Reproducible: Always Steps to Reproduce: <style> :link { text-decoration: none; color: #0000ff; } :hover { color: #ff0000; } </style> <a href="something"><li>this item won't hover right</li></a> Actual Results: not a great deal :D~ Expected Results: Without meaning to sound patronising, it should have applied the hover style to the link.
Here is a better example. <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> LI A testcase </title> </head> <style> :link { color: #0000FF; } :visited { color: #888888; } :hover { color: #ff0000; } </style> <body> <ul> <li><a href="...">This link is inside the list item.</a></li> <a href="..."><li>This link is outside the list item.</li></a> </ul> </body> </html>
This is because only <LI> is allow'd within <UL>…</UL> or <OL>…</OL>. Within <LI>…</LI>, you can have whatever you want, though: <!ELEMENT UL - - (LI)+ -- unordered list --> <!ELEMENT LI - O (%flow;)* -- list item -->
Dup of "[RR][ESM/CSS]{ib}a:hover css not working when text is inside an li" *** This bug has been marked as a duplicate of 146409 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
QA Contact: petersen → amar
You need to log in before you can comment on or make changes to this bug.