I have a div that's display block and 100% wide. I've added onmousedown events to the divs. All decent browsers can click anywhere in the divs but IE won't recognise click or hover except when the cursor is directly over a text character. It's like IE has chosen display:block for rendering but display:inline for mouse detection!

What's even weirder is that if I set a background-color in CSS or hover over the div border it works. FFS what part of ANY spec says a transparent background should ignore mouse events?

Does anybody know a fix for this that doesn't involve setting a background color?

1 answer

SpliFF 0
0
points

I fixed it with a repeated transparent 1px GIF background. Still be interested in a solution that doesn't remind me of pre-1990 web design!

Answered over 6 years ago by SpliFF