Design comparison
Solution retrospective
This is my first try , so the code is a bit messy, would love to hear where and how i can improve.
Community feedback
- @rnguecoPosted over 3 years ago
Hey Aman!
To be able to center your card element vertically and horizontally, you might want to use CSS Flexbox. This would be a better approach than hardcoding a padding/margin value to make your element appear centered on your screen, but on other screen sizes it might not be centered at all.
Also, I noticed that you are repeating a lot of your CSS. For example, all three of your buttons have three different classes applied to each. You can instead apply one class to all buttons (let's call this class
btn
) and then just add all common styles to this class. Like so:.btn { /* Put all common properties here. */ }
That way you don't have to repeat all the same properties for three different classes 🙂 This was a good first attempt!
Marked as helpful1 - @benjoquilarioPosted over 3 years ago
Hi, heyitsmeaman Congrats on your first frontend challenge, It still good even didn't have
flexbox
orgrid
, but I suggest you to understand more aboutbox model
and after that go withflexbox
layout so that It will make responsive. 😉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