Closing the gap between 2 inline elements
- by insanepaul
I have a simple div element that contains 2 inline tags. I've associated a onmouseout event to the div element.
The problem is that the onmouseout event is fired when the user hovers their mouse between the two tags in the div and also after the end of the second tag.
What I want to do is allow the user to hover their mouse across the whole of the div tag and only fire the onmouseout event when the mouse pointer is outside the div element (which is what I assumed from what I've done).
I increased padding to close the gap between the 2 tags. This works but where they meet in IE7 at least the event is fired!!!
I must be doing something wrong can someone please help.
<div id="Div1" onmouseover="hideDiv()">
<a id="A1" href="HTMLNew.htm">ARTICLES</a>
<a id="A2" href="HTMLNew.htm">COURSES & CASES</a>
</div>