You need Javascript to toggle the prices
Marked as helpful
Looking to hire developers?
Hi, I tried to achieve the price change only with CSS and the solution should work, however it didn't work.
Can somebody help especially why.header__checkbox:checked ~ * .plan__price--monthly
and .header__checkbox:checked ~ * .plan__price--annual
do not work.
I also found it difficult to achieve this by javascript.
Also any comments are welcome on HTML semantics and other stylings.
I need your help! 😂
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord