product-preview-card-component-main
Design comparison
Solution retrospective
I am still learning .. and I did not pass the course I am studying from to (Media Query).i took this challenge to apply what I learned, not as a challenge all feedback is welcome
Community feedback
- @fatlindshehuPosted over 2 years ago
Hi @Abdelrahman0Khaled
On Desktop screen sizes the component looks great, still, there are a few changes I would make:
- The component is centered using
position: absolute;
I would change that too flexbox - You can center the component using flexbox like this: On the body
display: flex
,justify-content: center
to center horizontally,align-items: center
to center vertically. - Make sure the body has a height of 100vh in order for the vertical alignment to work!
If you're planning to make the component responsive, I would suggest using flex, you only need to change
flex-direction
when coming to small screen size devices.- If you're unfamiliar with flexbox I would suggest checking this TUTORIAL
keep up the good work!
Marked as helpful0@Abdelrahman0KhaledPosted over 2 years ago@fatlindshehu Thank you very much.. I applied what you advised me and it is really better than position..it is my first time here and thank you for your advice to me
0 - The component is centered using
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