Having trouble with menu styling.
This is how the menu looks:
https://i.sstatic.net/pqzBm.png
Styling for each element is as follows:
.gallery-navi-element {
position: relative;
float: left;
text-align: center;
font-size: 1.7em;
padding: 0px 60px 0px 60px;
margin-top: 10px;
transition: height .8s ease;
}
.gallery-navi-element:hover:after {
content: " ";
position: absolute;
left: 50%;
/* top: 50%; */
transform: translate(-50%,0%);
top: 40px;
width: 0;
height: 0;
border-style: solid;
border-width: 20px 25px 0 25px;
border-color: rgb(74, 125, 51) transparent transparent transparent;
transition: 0.5s all;
}
With this setup, I can achieve this effect:
https://i.sstatic.net/CmuiG.png
However, I am struggling to make the triangle stay after a click. Using jQuery handlers to add classes doesn't seem to work, as the new class overrides the navigation buttons. I have also experimented with :target
without success. Any ideas?
EDIT:
Here is a fiddle link: https://jsfiddle.net/a7zs3z6o/