An anchor element without an href attribute looses its :hover css style on hover. Bug on Google Chrome: http://code.google.com/p/chromium/issues/detail?id=47000 This works fine in Firefox. EXPECTED: Hovering over an anchor <a> without an href= attribute should still trigger the :hover css styling.
:hover is intentionally ignored in quirks mode for anchors without the href attribute (in CSSStyleSelector::checkOneSelector()). It might make sense to change this if Firefox no longer has that quirk.
Yeah seems to work fine in FF 3.6 without a href attribute.
Does this work in IE?
Attaching 2 test cases. test.html is a page with no DOCTYPE, hence in quirks mode. Firefox 4 - :hover works IE8/IE9 (Quirks mode aka IE5 mode) - :hover doesn't work Webkit/Chrome - :hover doesn't work test1.html is a parent that wraps test.html above in an iframe. test1.html has a DOCTYPE html, hence rendered in standards mode. For the iframe - Firefox 4 - :hover works as before IE8 (Quriks mode aka IE5 Mode) - :hover doesnt work IE9 (Quirks mode BUT in IE9 engine) - :hover works Webkit/Chrome - :hover doesn't work as before Quirks mode in IE9 engine (a new mode that only IE team can add to make the lives of developers more miserable) is triggered when the top parent of the iframe is in IE9 document mode. The unholy determination chart can be seen here http://ieblog.members.winisp.net/misc/How%20IE9%20Determines%20Document%20Mode.svg
Created attachment 83988 [details] test
Created attachment 83989 [details] test1 (wraps test in an iframe)
Safari, Chrome, and Firefox show the same rendering behavior for this test case. I do not believe any further compatibility issue remains.