Design comparison
Solution retrospective
Hello, I just finished this project. Could you give me some tips how can I improve my code? And also what do you think about it :)
Community feedback
- @ratul0407Posted about 1 year ago
@ClaudioAmareno congratulations on completing this challenge. The solution is great😍😍
But There are some minor adjustments that you can make:
- Your
main
anddiv.card
are accomplishing the same thing. The.card
div is of no use, you can remove it or you can make ittext-wrapper
and remove the inner-one. - In your
text-wrapper
you've usedmargin: 0 21.5%
. You should avoid using percentages in paddings or margins on grid items entirely, as they will get different behavior in different browsers. And many times they will be the reason of your headache so go forrems
instead. - The
box-shadow
looks alright but you can make it little better. It's often quite hard to come up with your own box-shadow. Because you have play around with a lot of numbers as there are two axis and a blur and spread radius. It will take a lot of time for it to be as you want. So, to save up some time and effort you can use a box-shadow generator if you want to.
I hope it was helpful for you👍👍
Happy coding my friend🙂🙂
Marked as helpful1@ClaudioAmarenoPosted about 1 year ago@ratul0407 Thank you for your advice! But I don't know how to change my margin: 0 21.5%. I used percentages because when I was using rems, my card was so narrow (value: margin: 0 64rem). Everything was alright since I used DevTools, then everything was so narrow. That's why I used %
1@ratul0407Posted about 1 year ago@ClaudioAmareno
64rem
is1024px
it is too much😅, that's why it is narrow. you can use30rem
. I tried using30rem
on your solution and it looked great. You can play around with the numbers 30, 31 use the one you feel matches the design the most🙂Marked as helpful1@ClaudioAmarenoPosted about 1 year ago@ratul0407 Oh, you've right, I just added more media queries, and now is all ok :D thank you
0 - Your
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