Design comparison
Solution retrospective
I used margin:auto for the first div, so the Card could stay in the middle of the page. It fixes the responsiveness of the website Horizontally, however, i dont know how to fix vertically.
I mean, when i Zoom in and out, The card does not move left or right, But it moves Top - Bottom.
How can i Fix and let it blocked in the same place in the screen, just changing the size of the objects and not the position???
Please, feel free to criticize about best practices and coding in general.
Thanks for the answers, Let's all improve together!
Community feedback
- @denieldenPosted over 2 years ago
Hi Chicaofmp, great work on this challenge! 😉
Here are a few tips for improve your code:
- add
main
tag and wrap the card for improve the Accessibility - add descriptive text in the
alt
attribute of the image - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of image - remove all
margin
from.container1
class - use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container
Overall you did well 😁 Hope this help!
1@chicaofmpPosted over 2 years ago@denielden
Thanks for the tips!
I will make the challenge once more to improve these issues! And im studying more about css grid ans flexbox to avoid these kind of problems ;)
1 - add
- @al-lattePosted over 2 years ago
Hey 👋🏽 I just looked at your solution, nice work 👍
I think when you zoom in and out it could be possible that you're changing the viewport height, so the scrolling appears. To me it's not necessarily a problem.
0@chicaofmpPosted over 2 years ago@al-latte
Hey! thanks for the answer!
I just saw that my card is flying comparing to the Real one. I need to fix this next time.
Thanks!
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