Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Order Summary CSS Grid

@saykate

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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

Hassia Issah 50,670

@Hassiai

Posted

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 helpful

1

@saykate

Posted

@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
P
Alper 1,010

@adonmez04

Posted

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...

I hope these'll help you to improve your perspective. Keep coding. All the best.

Marked as helpful

0

@saykate

Posted

@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
P
Alper 1,010

@adonmez04

Posted

@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 helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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