Solution Pricing component with toggle

Please log in to post a comment
Log in with GitHubCommunity feedback
- @MahmoodHashem
Great job 👏
You could also practice toggling prices without using javascript by CSS like this:
.card .basic::after{ content: '19.99'; } .card .professional::after{ content: '24.99'; } .card .master::after{ content: '39.99' ; } main:has(.toggle-input:checked) .card .basic::after { content: '199.99' } main:has(.toggle-input:checked) .card .professional::after{ content: '249.99'; } main:has(.toggle-input:checked) .card .master::after{ content: '399.99'; }
Good luck
Marked as helpful - @MarziaJalili
Hello Stefan Bojkovski 👋, I am such a great fun of you. After I saw your solution, I downloaded the challenge and gave it a try😁😁. I don't know if you will consider this petty suggestion important or not because I am just a beginner here, but I badly want to share it🥲. While solving the challenge I realized that the size and position of the dollar sign and the price itself aren't the same🤔. Then, I wrapped a <span> and a <strong> element inside a <div> that had a display of flex and finally put the value of align-items to center and change the font-size of the dollar sign😎. Over all, you have done a great job girl🙌, you could also check out my solution if you don't mind.
Marked as helpful - @Abdalla2200
Great job, but I have a question: how do you use customized styles in config.js with CDN? I'm trying to use it, but the styles don't appear on the website. i also copied your config.js code but didn't work
- P@Richard1876
Group study to share ideas
- P@Richard1876
would you like to team up
Join our Discord community
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