ARTICLE AD BOX
I am using CS-Cart Multi-Vendor with the Nova theme. My main header menu (.tygh-header .ty-menu__items) is horizontally scrollable with overflow-x:auto and display:flex.
When I click a category <li>, the submenu opens, but the clicked item does not scroll into the center of the container.
I want one single click to:
smoothly scroll the clicked <li> to the horizontal center of .ty-menu__items open its submenu (default CS-Cart behavior)How can I calculate the correct scrollLeft and trigger the submenu without requiring a second click and without affecting other menus?
Demo link: PASTE YOUR LINK HERE
Browser: iOS Safari + Chrome desktop
