Design comparison
Solution retrospective
I just started html, css and I was proud I was able to get most of the project down. I am learning more by the day, and I will like to deploy more projects
What specific areas of your project would you like help with?I need help on making it mobile, centering, and moving the elements because I use margin and padding but I know their is a different way.
Community feedback
- @MikDra1Posted 2 months ago
If you want to make your card responsive with ease you can use this technique:
.card { width: 90%; max-width: 37.5rem; }
On the smaller screens card will be 90% of the parent (here body), but as soon as the card will be 37.5rem (600px) it will lock with this size.
Also to put the card in the center I advise you to use this code snippet:
.container { display: grid; place-items: center; }
Hope you found this comment helpful πππ
Good job and keep going πππ
Marked as helpful0 - @justCaioDevPosted 2 months ago
It was very good, congratulations! Here are some tips: 1- To reset CSS, you can use box-sizing: border-box. This makes things much easier.
2- Itβs not recommended to use a fixed width or height on the body. Instead, you can use width: 100% and height: 100vh. This helps with the responsiveness of your site.
3- Instead of trying to center elements using margin or padding, you can apply display: flex to the body, and then with align-items: center and justify-content: center, it will automatically center everything. This also helps with responsiveness.
Remember, whenever you need to align or center elements, always prioritize using display: flex.
To make a site mobile-friendly, you can search on YouTube for "Media query css." It's really easy to understand, and it will change your life once you learn it. Good luck with your studies!
Marked as helpful0
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