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

Responsive Results summary component using CSS grid and media query

KellyDev 20

@StarFilledDonut

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


Hello people, i'm still new to Frontend Mentor and this was my first project really using CSS grid, and in general a responsive layout, feedback is more than welcome, and if possible, please answer my questions below:

  • Was it difficult to add a responsive grid in this project?
  • Did you use media query in your code and why?
  • What type of unit do you recommend for this situation?
  • Is it best practice to design the mobile layout first?

Community feedback

@MaximilianoDanielGarcia

Posted

Hi Kelly, great job!

  • If you are wondering why isn't centered It's because you have to add this:
body {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

Then, remove margin properties from #outer styles.

  • If you want to improve shadows, try with this values:
#outer {
    box-shadow: 10px 30px 30px var(--pale-blue);
}

After you apply these It will look perfect.

Marked as helpful

2
Daniel 🛸 44,190

@danielmrz-dev

Posted

Hello @StarFilledDonut!

I saw that on your desktop version, your used margin-top to place your card in the middle of the page.

I saw that @MaximilianoDanielGarcia already told you how to do it using Grid, since it's what you're using in this project.

But it's also possible to do it using flex and it's quite similar to what Maximiliano suggested.

Here's how you can do it:

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;    
}

Other than that, I think you did a great job!

Marked as helpful

1

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