How to place some text over the DIV without breaking hover area of this DIV?
Posted
by
Andr
on Stack Overflow
See other posts from Stack Overflow
or by Andr
Published on 2011-03-19T00:05:21Z
Indexed on
2011/03/19
0:10 UTC
Read the original article
Hit count: 127
I'm total noob with CSS and it looks like hell =/
I have absolute positioned DIV and I handle mouse events over this DIV with JS like this:
<div style='position: absolute; left: 0px; width:50px; height: 50px;'
onmouseover='this.style.border="2px solid red"'
onmouseout='this.style.border="1px solid black"'>
</div>
<div style='position: absolute;'>SOME TEXT</div>
I need to place some text over this DIV and over the few same DIVs, but if I place any element over this DIV onMouseOut event is firing when mouse cursor switch to text. Tag with text can't be inside the DIV. Playing with z-index didn`t help. My browser is IE8.
© Stack Overflow or respective owner