Design comparison
Solution retrospective
What did you find difficult while building the project? =css tires me the work was time consuming.
Which areas of your code are you unsure of? =i worked my ass off the best way i can on this website even as a newbie so there is no are I am unsure about.
Do you have any questions about best practices? =there must be some very basics and the challenges should be in a level format like level 1 qr-code level 2 card-review something like that and each clearing increases the level of the user interacting to frontend that will totally very good way i think from my perspective.
Community feedback
- @visualdennissPosted over 1 year ago
Hey there,
good job completing the challenge successfully. Your implementation looks great overall. One tip i'd have is that i noticed there is a little tiny white space below the image.You can get rid of that easily by:
img { display: block }
images are technically set to display: inline (like text) by default but behave like inline-block (meaning one can set width and height explicitly). You can see that text have usually some tiny white area below and above the letters. So this is where this behaviour comes from. By display: block, you can get rid of that.
Hope this was helpful!
Marked as helpful0@aaishverPosted over 1 year ago@visualdenniss thank you buddy for the feedback and ill take note of the display block you told me
0 - @Orchi1904Posted over 1 year ago
Hey @aaishver,
I am very happy with your solution, it looks great. There are only three small things that make it better in my opinion:
-
It is great that you used a footer element for the attribution but the footer element should be inside the body element, because the footer is part of the website
-
Your solution looks even better if you center the card. This is possible if you add the following things to your body-selector in your CSS:
body{ padding-top: 8rem; background-color: hsl(30, 38%, 92%); margin: 0; /*Get rid of unnecessary margins*/ padding: 0; /*Get rid of unnecessary padding*/ height: 100vh; /*Body height is now full viewport height*/ display: flex; flex-direction: column; /*Use this so that the card and the footer are below each other and not next to each other*/ justify-content: center; /*Center the card vertically*/ align-items: center; /*Center the card horizontally*/ }
- <p> are not allowed as a child elements of <button>. You should rather use a <span> element inside the button like so:
<button> <img src="images/icon-cart.svg" alt=""/> <span>Add to Cart</span> </button>
I hope this was helpful for you. Happy coding!
0@aaishverPosted over 1 year ago@Orchi1904 thanks for the feedback and ill take look upon the things you told me to
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