Design comparison
Solution retrospective
I'm having a hard time figuring out how things are going to actually look when they go live. I was using the Go Live feature on VScode and everything looked good. I put a little padding above the card component and it solved my issue of it seeming to go off the page. But when I uploaded to Github and created a live page, it's totally off the page at the top, you can't even scroll to see the top of the card. I'm so confused by this, if anyone can give me some input I'd really appreciate it! Thanks!!
Community feedback
- @HassiaiPosted almost 2 years ago
wrap <div class="attribution"> within the footer tag to fix the accessibility issue.
To center .card on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center .card on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center .card on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@saykatePosted almost 2 years ago@Hassiai thank you so much for the response! I have actually tried to include the grid version you recommended, and for some reason it didn’t help with this one, which is when I added padding to the main element. I’ll keep playing with that, and I’ll try the flex version too. I appreciate the help!!
1 - @adonmez04Posted almost 2 years ago
Hi, @saykate.
It's a really good and clean solution. You solved the flow problem with use block elements. And you have a 4 column grid to separate the last of them, I think it's a smart move:) I spent a lot of time trying to find an ideal grid layout. But 4 column, it's so clear...
-
You can use BEM notation to give your class names. I've same problem because I use lots of nested structures. You can check this for another clear solution and rename your class name with BEM notation Rostyslav Nazarenko's solution.
-
And you can check BEM notation here. Offical Website the BEM Notation
I hope these'll help you to improve your perspective. Keep coding. All the best.
Marked as helpful0@saykatePosted almost 2 years ago@adonmez04 Thank you so much for the feedback! I’ve recently heard of bem and will definitely try and start using it in my solutions, great advice!
1@adonmez04Posted almost 2 years ago@saykate BEM notation is not necessary but it is widely used. SASS and Bootstrap use BEM notations to name classes. If you have a large nested structure you can use Grand Parent in the BEM for your class names. There are many perspectives on BEM. We'll improve our coding skills step by step... Keep coding...
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