Design comparison
Solution retrospective
Feedback on best practice coding would be much appreciated. Thanks!
Community feedback
- @Zy8712Posted 10 months ago
Your site looks great! The only thing I'd alter is the use of
<div class="button">
inside of your<button>
tags as it is sort of redundant in my opinion. So the main thing I'd say you should work on is the formatting of your code and elimination of redundant code. In this case you should be able to implement the button just using:<button> <img src="./images/icon-cart.svg" alt="cart_icon"> Add to Cart </button>
as the bare minimum. Along with some css code like this:
button{ width: 100%; height: 45px; color: var(--theme-white); background-color: var(--theme-dark-cyan); border-style: none; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-family: var(--font-theme-montserrat); font-weight: 700; } button > img{ margin-right: 10px; }
Aside from that I'd say you have some good practices such as the use of semantic tags and the abscence of redundant alt text for images. Nice work 👍
Marked as helpful1@nn-code80Posted 10 months agoHello Bryan, thanks for taking the time to analyze my coding and share these tips. I appreciate it. @Zy8712
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