Click to See Complete Forum and Search --> : Nested Div calls onmouseout of parent, y?


plazma1
04-07-2008, 04:16 PM
I'm wondering if anyone can provide some insight on the onmouseover and onmouseout beahviours when it comes to using them with divs.

Right now I'm playing around and have created a smaller div nested inside another larger div. The nested div and container both have onmouse events written in the div tags - ie <div onmouseout="javascript:function()"

What seems to happen though, which I wish wouldnt happen, is that when i mouse over the nested div, the container div onmouseout is called. Is this a browser specific thing and is there anyway to avoid this so that when im on the nested div, the parent div doesnt call the onmouseout event?

KDLA
04-07-2008, 07:48 PM
What sort of function are you calling? It could be that there is an alternative way to do this, through either CSS :hover or restructuring your HTML.