I am facing a situation where I have an icon represented by the HTML code <a>
, which acts as a link redirecting to a different page. This <a>
is nested inside a collapsible button, meaning that clicking on the icon expands the menu before actually executing the link redirection.
My query revolves around the possibility of controlling the stacking order (z-index) of the <a>
element in a way that would prevent the menu from expanding when the icon is clicked, while still keeping it housed within the <button>
. If this isn't achievable, what alternative approach would you recommend?
Feel free to review the code snippet at: https://codepen.io/anon/pen/GaygNQ