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 using HTML and CSS

@AnthonyPA0902

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


There are 4 things that I found hard to do:

  1. Make the icon in a horizontal line with the text
  2. Make the score in a vertical line
  3. Make the content in the middle of the page ( This I've done but it quite hard to know where is the middle of the page )
  4. Make the page change when using on mobile

I would be grateful if anyone can help me. Thank you so much

Community feedback

@finitehorizons

Posted

-So, instead of making a specific class for each summary row and then magic numbering them in line, you should put them all inside a flex container(or grid) and then use gap to move them around the page. To adjust the individual styles of each score, you can add a second class for each for the colors specifically.

-Flex or grid solves this problem

-The middle of the page problem is solved by setting a min-height to the page(or body) of 100vh and then using margin to center or using flex/grid to align/justify the container to the center of the screen

-This requires media queries. You set a max or min limit to screen width and then adjust styles accordingly based on that size. Example: @media screen and (max-width: 600px) { ...styles go here}

That would apply styles only when the screen size is less than 600px. Hope this helps :)

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