Simple: do not embed your #inner div inside. Small demo: small link . Notice that I added:
html, body { position: relative; }
What is needed in this case.
Edit: if you insist on its nesting, a little JavaScript is needed. Here's a sample:
var inn = document.getElementById("inner"), outt = document.getElementById("holder"); outt.onmouseover = function() { this.style.backgroundColor = "rgb(0, 162, 232)"; } outt.onmouseout = function() { this.style.backgroundColor = "orange"; } inn.onmouseover = function(ev) { ev.stopPropagation(); }
(This will be shorter if written using jQuery, but the idea is the same).
Here is a demo: a small link .
Chris
source share