IE8 Standards mode: onclick handler on div does not fire

丶灬走出姿态 提交于 2019-12-01 12:24:43
Juan Villegas

I had the same problem in IE8. The transparent areas in the DIVs were not clickable. An easy solution is to set the background-image to a transparent .gif.

My solution in CSS:

background-image: url("images/pixel.gif"); 

...where pixel.gif is a 1x1 transparent image.

I've found the solution. It was the "float:left" attribute on the buttons that made it fail.

Which is rather strange because in all the other places where this code was included, it also had the float - and it worked. Even in IE8.

Anyway, removing it and using "display:inline-block" for the placement did the trick.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!