Make the class .active
declaration the last line of your CSS file and it will work.
What is happening here is that the class .menu-inheader
(the one you use on sub-buttons) have the same CSS specificity of the class .active
, so the browser is using the last one declared in the .css file.
For more info on CSS Specificity calculation, see this MDN Article.
P.S.: Try to always include the code itself in the question, along with the demo link.
1
solved HTML Buttons not reacting to JQuery [closed]