
Design comparison
Solution retrospective
- I used css custom variables for this project
- I was able to understand how max-width works
- Main challenge was centering component
- I overcame that using flexbox and min-height to push the footer down
- I would like reviews on how responsive my work is.
- The font sizes
- And how I can use css Grid to do this
Community feedback
- P@huyphan2210Posted 3 months ago
Hi, @cEbuka,
I’ve reviewed your solution and would love to share some suggestions: 1. Use
min-height: 100vh
on the body instead of.wrapper
Applying
min-height: 100vh
directly to thebody
ensures the entire viewport height is utilized without adding unnecessary structural elements. This approach keeps the layout cleaner and more consistent across devices.2. Simplify the structure by removing
.wrapper
The
.wrapper
div isn’t necessary here. Themain
andfooter
tags are semantic and can stand alone. You can transfer the styles from.wrapper
to the body for simplicity. Similarly, the.text
class isn’t required—apply its styles directly to theh1
andp
tags. This reduces nesting and makes the markup cleaner.3. Avoid using Flexbox or Grid on the card (
main
)Flexbox or Grid isn’t needed on the
main
section itself. If the goal is to center the card, apply Flexbox or Grid to thebody
(after removing.wrapper
). This allows for easier vertical and horizontal centering. Since most of themain
’s children are block-level elements (likeh1
andp
), they naturally stack vertically. You only need to add appropriatemargin
for spacing.4. Properly use Grid for centering If you want to use Grid for centering, apply
display: grid
andplace-items: center
to thebody
. This efficiently centers all content. However, remember thatplace-items: center
centers all children, not just one. I recommend exploring Grid more through practice to find what best suits your layout.Hope this helps!
Marked as helpful0@cEbukaPosted 3 months ago@huyphan2210,
Thanks for the review, I made some changes and learnt something new from you.
- For the
.text
, I used it as a container to apply styles to thep
andh1
. - I am working on CSS Grid layout, Thanks a lot.
1 - For the
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