Design comparison
Solution retrospective
In this challenge I faced an issue to center the cart icon and i tried so many times but failed to center it. Please guide me on how to center it. Not only that but also give feedback on my code since Iam a newbie i can improve my skills.Thankyou.
Community feedback
- @correlucasPosted over 2 years ago
πΎHello Bandaru Sindhuja, congratulations for your new solution!
Answering your question:
All you need to to is to use
display: flex
for the button + icon alignment, see the code below:.button { display: flex; text-align: center; max-width: 100%; align-items: center; justify-content: center; }
π I hope this helps you and happy coding!
Marked as helpful1 - @alaaballoutdevPosted over 2 years ago
Keep going , but you can improve your work by searching how to centralize the div whatever the size of screen is , and my code in this challenge to centralize the div might be helpful for you.
hints: position:absolute; right:50vw; top:50vh; margin-right: - widthofdiv/2; margin-top: - heightofdiv/2;
Good luck!!
Marked as helpful0
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