RESOLVED INVALID 42819
:hover selector on div with z-index: -1 and position: absolute is broken
https://bugs.webkit.org/show_bug.cgi?id=42819
Summary :hover selector on div with z-index: -1 and position: absolute is broken
tristanstraub
Reported 2010-07-22 06:25:40 PDT
:hover selector on div with z-index: -1 and position: absolute, doesn't match div. Example: Top two buttons don't change. <DOCTYPE html> <html> <head> <style type="text/css"> .title {} .entry {} .tag { -moz-box-shadow: 0px -5px 0px #000; -webkit-box-shadow: 0px -5px 5px #000; -moz-border-radius: 10px 10px 0px 0px; -webkit-border-radius: 10px 10px 0px 0px; width: 80px; text-align: center; background: #77ff00; height: 30px; position: absolute; padding-bottom: 0px; } .tag:hover { padding: 20px; -webkit-transition: 0.1s ease-in; -moz-transition: 0.1s ease-in; } .g1 { left: 0px; } .g2 { left: 80px; } .h1 { bottom: 0px; } .h2 { bottom: 50px; z-index: -1; } </style> </head> <body> <div class="title"></div> <div class="entry"></div> <div class="tag g1 h1">left</div> <div class="tag g2 h1">right</div> <div class="tag g1 h2">left</div> <div class="tag g2 h2">right</div> </body> </html>
Attachments
test case (975 bytes, text/html)
2010-07-22 16:41 PDT, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2010-07-22 16:41:00 PDT
Created attachment 62359 [details] test case Same test as an attachment.
Simon Fraser (smfr)
Comment 2 2010-07-22 16:46:32 PDT
A z-index of -1 puts the element behind the body, so the body gets the hover and hit testing. This is correct behavior.
mitz
Comment 3 2010-07-22 16:47:20 PDT
See also bug 13034.
Note You need to log in before you can comment on or make changes to this bug.