Design comparison
Solution retrospective
- Did the design scaled nicely for you?
- Do you have any tips for code organization? Am I overorganizing?
Community feedback
- @DavidMorgadePosted about 2 years ago
Hello Fobya! congratulations on finishing the challenge and welcome to the frontendmentor community!
If you don't mind I will try to answer your questions:
-
Well, the card scales good but it breaks a bit at tablet sizes, try using some relative units to define the size of the card, for example,
width: 40rem
in your.product-preview
media querie of 701px instead of width: 50%, because when scretching the screen, the image gets too small because of the width of the container being too low! -
You code CSS file looks well structured and explained, comments are always a great think to use, I think that you just used the necesary amount for this project, for a guy to come out and understand what each thing does.
I would also like to give you a personal recommendation regarding the centering of your card, instead of using
padding
on your<body>
andmargin
on yourproduct-preview
, try using flexbox on the body to center the component directly, you just need to give the body amin-height: 100vh
to wrapp al the screen and then use flex to center like this:body { background-color: var(--color-background); display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 100vh; }
Hope my feedback helps you!, if you have any questions, don't hesitate to ask! you did a great job as a first challenge here
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