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

Results summary component

Promiseβ€’ 50

@PromiseLanga

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What challenges did you encounter, and how did you overcome them?

I struggled using Flexbox and also properly aligning my items.

Community feedback

Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

Hello, @PromiseLanga!

Your project is looking fantastic!

I'd like to suggest a way to make it even better:

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 or margins 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 helpful

0

Promiseβ€’ 50

@PromiseLanga

Posted

@danielmrz-dev Noted, thank you.

1
P
Lo-Deckβ€’ 2,020

@Lo-Deck

Posted

hi, first thing .

body {
    background-color: var(--color1);
    width: 1440px;
}

Don't set width: 1440px; it's useless, if your screen is bigger than 1440px you will have a bad behavior.

And try to center the item within the body with flex or grid.

Check out your html with the 3wc validator, it will show you all your mistakes.3wc.

Correct your html first, it's the way to have a better website.

Hope to be helpful.

Marked as helpful

0

Promiseβ€’ 50

@PromiseLanga

Posted

@Lo-Deck Thank you so much, it is helpful. I will fix it.

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