Shopify themes, liquid, logos, and UX
I have built an FAQ section, where the question is in the colour grey. I would like it that when the element is clicked the text turns to black. I used the ':active' in my CSS file but that obviously only works when the element is being clicked. How can I make it so that when it is clicked it remains active until clicked again, or another question is clicked?
Thank you! My CSS code is below 🙂
.tab-label {
width: 100%;
display: flex;
justify-content: space-between;
padding: 1em;
font-weight: bold;
color: #87878c;
background-color: #fff;
}
.tab-label:active {
width: 100%;
display: flex;
justify-content: space-between;
padding: 1em;
font-weight: bold;
color: #2c2c2c;
background-color: #fff;
}
Solved! Go to the solution
This is an accepted solution.
Don't worry this is solved!
This is an accepted solution.
Don't worry this is solved!
User | RANK |
---|---|
182 | |
150 | |
80 | |
72 | |
61 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023