Design comparison
Solution retrospective
couldn't positioning the whole container to the center, button issues on mobile view . Please tell me how I can improve.
Community feedback
- @hyrongennikePosted about 2 years ago
Hi @Quantom223,
Good job on your first attempt
To center the card in the middle of the page you can make the following changes to you body rule in the media query.
@media screen and (min-width: 601px) { body { width: 600px; min-height: 100vh; display: flex; justify-content: center; align-items: center; } }
and the button is missing padding on mobile because you're only adding the padding in the min-width:601px media. you can add the padding
padding: 0.8rem;
on the .addToCart class outside the media query and both mobile and desktop will have padding.Hope this is helpful.
Marked as helpful0 - @Quantom223Posted about 2 years ago
Thank you sir, it was helpful. the card centered to the middle, And the button are fixed too
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