What purpose does div.test
serve?
The problem is it's overlapping div.first
because it's positioned absolutely. Depending on your desired effect, you probably need to move div.test
inside div.first
(or vice versa). Whichever will be the container needs to be positioned (relative or absolute or otherwise) if it will hold a position: absolute;
element.
Both elements are competing for :hover
, since they overlap. Thus the flicker (as one gains and the other loses :hover
, and back again, upon mouse movement).