Design comparison
Solution retrospective
I position the old price using position: relative and the top and left attributes. Is there another way to do it? Even if it may not be more efficient I just want to know of other methods.
Feedback is greatly appreciated.
Community feedback
- @DavidMorgadePosted about 2 years ago
Hello Renardo great job finishing the challenge! congratulations.
There is a better way to position both of those elements, you can add a
div
wrapper between the prizes and use flex to position them, for example:.div__wrapper { display: flex; align-items: center; justify-content: space-between; // or whatever space you want with them }
You can also use
justify-content: center
and then separate them using thegap
property, but using a default prop for justify-content usually is better, with align-items you will get them centered vertically!Hope my feedback helps you for future challenges!
0@PinedevsPosted about 2 years ago@DavidMorgade Thank you. I'll put that to good use in my next project.
1
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