When the user hovers over the menu, you may use CSS styling to show and hide the drop-down list. A smart solution is to build a div that contains the menu and the drop-down.
<div class="dropdown">
<button>Profile</button>
<div class="dropdown-options">
<a href="#">Dashboard</a>
<a href="#">Setting</a>
<a href="#">Logout</a>
</div>
</div>