Design comparison
Solution retrospective
Any feedback to help make my CSS more efficient would be awesome!
Community feedback
- @ApplePieGiraffePosted over 2 years ago
Hey there, Brian Schooler! π
Good job on this challenge! π Your solution looks pretty great! π
As for tips for your CSS, as you continue building projects you may want to look into using a system to keep naming your classes neat and consistent. One such popular method is known as BEM. It's definitely worth a look! You can learn more about it here, if you'd like.
You also might want to use a preprocessor such as Sass. It'll add superpowers to your CSS and introduce features like nesting which will cut down on the number of lines of code you have and make writing and organizing CSS a little easier (or much easier for large projects). π
Check out Sass and how to use it here.
Hope you find these tips helpful. π
Keep coding (and happy coding, too)! π
Marked as helpful3 - @rockingrohit9639Posted over 2 years ago
Hey @superschooler,
You can use
body { display: flex; align-items: center; justify-content: center; }
This will immediately make your solution more accurate to the design.
0@superschoolerPosted over 2 years ago@rockingrohit9639 Hi Rohit, thatβs already in my CSS, Iβm not sure why it isnβt centered vertically.
0@rockingrohit9639Posted over 2 years ago@superschooler
You should have
width: 100%; height: 100vh;
either on body or your
main
.Marked as helpful1
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