Design comparison
Solution retrospective
Please no copy/paste comments. :)
I would love to know a better way of adding the rating stars without pasting the <img> tag 15 times.
What do you think was the most elegant way to offset/stagger the ratings and purple cards? I ended up using translateX and Y.
Community feedback
- @florianstancioiuPosted over 2 years ago
Hi,
I don't think there's a better way of adding the stars (there is another way of adding the images that would not involve writing them multiple times but the click functionality would be lost and without it, the ratings are useless).
As for the ratings, I used
position: relative
and set theleft
property to a negative value. The ratings could have been done also using a negative margin but I think the way you did it with translate is probably the most elegant way.Keep on coding!
Marked as helpful1
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