I made a simple script to demonstrate my problem. http://jsfiddle.net/JTqww/
HTML:
<body> <div class="button"> <a href="#"> <img SRC="http://www.mikesfreegifs.com/main4/halloween/comehere.gif"/> <span class="desc">Description</span> </a> </div> </body>
CSS
.button { float: left; width: 100px; } .button a { background:green; float:left; z-index:-1; } img { display:inline-block; } .desc{ display:inline-block; text-align:center; width:200px; background-color:blue; color:white; } .button:after { position: absolute; top: 10%; left: 10%; content:"I destroy your anchor"; color:red; position: absolute; width: 50%; height: 50%; background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); }
As you can see, I made a button with the effect of reflecting glass on top, on top of the image. I wanted the image and description below to be wrapped in an anchor tag (which they are: after the content, it seems to block the anchor). If you move the mouse outside the glossy white area, it will interact with the anchor, but it will not be inside the white gloss area.
I tried using the binding and changing the z-index, but the content was posted: after the button (βshineβ) does not seem to allow the anchor to receive mouse and event events.
Does anyone know how to fix this? Any help is greatly appreciated.