Closing a dropdown menu problem

I’m trying to get a drop down menu to close when a user moves mouse the next button. Foe example there are two buttons placed horizontally next to each other…mouse rolls over first button - menu opens, then mouse rolls over second button - the fist menu doesn’t close as the invisible button is missed by the mouse. What’s a work around for this. I’m new pls help.