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

First try

@JhonataRamosShikas

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


I wanted to make it responsive, but I don't know how

Community feedback

@asbhogal

Posted

Hi Jhonata,

To make this responsive, you can either use flex-direction: column in a @media query or flex-wrap, or grid, which would retain the structure. The choice of when to use either depends on the content and how you want it to adapt, but here's a good link explaining the difference between the two. Link

Before you do this however, I'd suggest making several changes to your code because these are causing issues to your layout:

  • Remove the margin-left on the section as this is causing issues with viewport width changes. Presumably this was added to try and centralise the container? In any case, use justify-content: center and remove the width: 50% on the .results .sumario.
  • You should also remove the width on the parent .conteudo container as explicit values shouldn't be set on this. Set a max-width instead, with a width: 100%, so anything below the max-width value will occupy the full width of the viewport and above, it will stay at the fixed max-width.
  • Change the height to 100vh to keep it vertically centered as, same as above, you shouldn't be using explicit values for these, as they constrain content and cause overflowing issues (ie. when content inside spills outside because the container isn't adapting as it has a fixed value set.)

Hope this helps!

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