Closing the gap between 2 inline elements

Posted by insanepaul on Stack Overflow See other posts from Stack Overflow or by insanepaul
Published on 2010-04-23T07:48:24Z Indexed on 2010/04/23 7:53 UTC
Read the original article Hit count: 302

Filed under:
|
|

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>

© Stack Overflow or respective owner

Related posts about html

Related posts about css