Design comparison
Solution retrospective
I need to improve my CSS, especially my mobile designs.
Community feedback
- @danielmrz-devPosted 5 months ago
Hello there!
Congrats on completing the challenge! ā
Your project is looking fantastic!
I'd like to suggest a way to make it even better:
- Using
margin
and/orpadding
isn't always the most effective method for centering an element.
Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:
š Apply this CSS to the body (avoid using
position
ormargins
in order to work correctly):body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
I hope you find this helpful!
Keep up the excellent work!
Marked as helpful0@OgagaAkpowenre1Posted 5 months ago@danielmrz-dev Thanks so much for the advice! I'll be sure to implement this in my next project.
0 - Using
- @MunibAhmad-devPosted 5 months ago
Great job on your solution! Your design and functionality are impressive. I noticed you mentioned wanting to improve your CSS, especially for mobile designs. One thing that has helped me is focusing on media queries to ensure responsive layouts. For example, using @media rules to adjust font sizes, padding, and margins can make a big difference on smaller screens. Additionally, utilizing flexible grid layouts or frameworks like Flexbox and CSS Grid can simplify responsive design. Keep experimenting and practicing, and you'll see improvement in no time. Looking forward to seeing more of your projects!
Marked as helpful0@OgagaAkpowenre1Posted 5 months ago@MunibAhmad-dev your encouragement means a lot. Thanks so much. I'm still learning how to work with media queries but it's slow going. I'm not giving up though!
1
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