I am attempting to display the list of sub-menu
items when hovering over the main menu item. I have tried using the following CSS code, but it did not work as expected. Any assistance will be greatly appreciated.
CSS:
summary.header__menu-item.list-menu__item.link:hover u.header__inline-menu details[open] > .header__submenu,
summary.header__menu-item.list-menu__item.link:focus .header__inline-menu details[open]>.header__submenu {
display: block;
}
HTML Structure here:
<nav class="header__inline-menu">
<ul class="list-menu list-menu--inline" role="list">
<li>
<a href="/" class="header__menu-item header__menu-item list-menu__item link link--text focus-inset">
<span>Home</span>
</a>
</li>
<li>
<details-disclosure>
<details id="Details-HeaderMenu-2">
<summary class="header__menu-item list-menu__item link focus-inset" role="button" aria-expanded="false" aria-controls="HeaderMenu-MenuList-2">
<span><a style="text-decoration:none;" href="/pages/meal-kits">Meal Kits</a></span>
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-caret" viewBox="0 0 10 6">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.354.646a.5.5 0 00-.708 0L5 4.293 1.354.646a.5.5 0 00-.708.708l4 4a.5.5 0 00.708 0l4-4a.5.5 0 000-.708z" fill="currentColor"></path>
</svg>
</summary>
<ul id="HeaderMenu-MenuList-2" class="header__submenu list-menu list-menu--disclosure caption-large motion-reduce" role="list" tabindex="-1">
<li>
<a href="/collections/jamaica" class="header__menu-item list-menu__item link link--text focus-inset caption-large">Jamaica</a>
</li>
<li>
<a href="/collections/guyana" class="header__menu-item list-menu__item link link--text focus-inset caption-large">Guyana</a>
</li>
<li>
<a href="/collections/trinidad" class="header__menu-item list-menu__item link link--text focus-inset caption-large">Trinidad & Tobago</a>
</li>
</ul>
</details>
</details-disclosure>
</li>
</ul>
</nav>