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 Design Using HTML and CSS || No Javascript

Manny Andemβ€’ 230

@mannyAndem

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 didn't use any javaScript because I'm still just starting out :)

I tried using gap in my flexbox container but it didn't work so I had to make do with margins. Could there be a reason why?

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

iMAGES πŸ“Έ:

  • alt text is a descriptive text attribute added to an HTML image tag that provides a textual description of an image for users who are visually impaired or cannot see the image for any other reason.
  • The purpose of alt text is to convey the meaning and context of an image to these users so that they can understand the content and information conveyed by the image.
  • But here, The svg's are just used as a decoration material.
  • Meanwhile it also needs an alt attribute with empty value
  • Eg: <img src="./assets/images/icon-reaction.svg" alt="">

CSS 🎨:

  • Looks like the component has not been centered correctly. So let me explain, How you can easily center the component without using margin or padding.
  • We don't need to use margin and padding to center the component both horizontally & vertically. Because using margin or padding will not dynamical centers our component at all states
  • To properly center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here πŸ“š.
  • For this demonstration we use css Grid to center the component
body {
    min-height: 100vh;
    display: grid;
    place-items: center;
}
  • Now remove these styles, after removing you can able to see the changes
.container {
   margin: 10vh auto;
}
  • And another thing that you used 40vw for width of .container, using vw in components may cause sizing issues. Instead 40vw i recommend you to apply 40em which provides better sizing for the component's layout
  • Now your component has been properly centered

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

0

Manny Andemβ€’ 230

@mannyAndem

Posted

@0xAbdulKhalid

Thanks a lot for the detailed feedback Abdul.

I'd implement these going further :)

0
Chrisβ€’ 520

@9CB5

Posted

The property justify-content: space-between is overriding your gap because it is evenly spreading all child elements inside the parent container. If you want to see the effect of the gap property then either remove/change justify-content: space-between or set a higher gap value (e.g. 3rem).

Marked as helpful

0

Manny Andemβ€’ 230

@mannyAndem

Posted

@9CB5 Ohh, I see, thanks :)

0
ailight360β€’ 70

@ailight360

Posted

Hi, congrats?? on completing the challenge. Better take care about following points.

  1. Always check Frontendmentor Report Generator issues after submitting the project for removing errors and warnings. To avoid accessibility issue.
  2. An**"img"** element must have an "alt" attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
  3. This approach creates accessibility error reports, "All page content should be contained by landmarks" is due to non-semantic markup, which results in a webpage without a landmark.
  4. So fix it by replacing the <div class="container"> element with the semantic element <main> along with <div class="attribution"> into a <footer> element in your index.html file to improve accessibility and organization of your page.

To used gap in a flex remove high

    height: 50%;
    justify-content: space-between;
}
1

Manny Andemβ€’ 230

@mannyAndem

Posted

@ailight360

Thanks, I'd try writing more semantic markup from now on.

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