Design comparison
Community feedback
- @mattstuddertPosted almost 5 years ago
Hey Ben, nice work on this! Why would you need JS to add an animation/transition? Both of those are possible in CSS. One way to achieve it would be to have a parent element on the prices that is a set
height
. Then useposition: absolute;
on the prices and useopacity
instead ofdisplay: none;
to transition the content.It's great to see that you got the toggle working with just CSS. For the positioning, I'd take the two toggle headings out of the
header
and have them as flex children as well in a row above thewidth: 100%;
main
element. It will take so playing around with, but it will be possible.I hope that helps. Keep up the great work!
0
Please log in to post a comment
Log in with GitHubJoin 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