Create a dropdown menu in Confluence using HTML/CSS

Dear community ,

I am struggling to create a two-tier navigation menu in my Confluence page. Actually I wrote the HTML and CSS code which is perfectly working in a browser. When I use it in Confluence ( through DIV, HTML and CSS macro) only the first menu level works. When I hover the mouse the second tier is not displayed. This is the CSS for the second level :

nav_menu ul li:hover > ul {
display: block; /* Display the submenu on hover of the li element */
}
.nav_menu > ul::after {
content: “”;
display: block;
clear: both;
}
I suppose the problem is here. Any suggestions ? Thanks !!! Salvo