Results summary component Created using HTML and CSS only
Design comparison
Solution retrospective
As easy it looks but it wasn't cause I have to make so many div's to make different colored texts. And I was having a little difficulty matching those gradient colors. Could you suggest some easy ways to reduce using so many div's and how to make gradient transition as mentioned in template. It could also be made a little bit interactive with some JavaScript you can also suggest me some ideas about it.
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
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.
HTML π:
- The
alt
attribute should not contain underscores or hyphens, it must be human readable and understandable.
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
- Not all images should have
alt
text. The<img src="images/icon-memory.svg">
is a decorative image, it does not add any information to the page. You should use an emptyalt
attribute instead of a descriptive one. You can read more about this here π.
- Eg:
<img src="images/icon-memory.svg" alt="">
- If you want to learn more about the alt attribute, you can read this article π
CSS π¨:
- As per the design we want to center the component
<main>
both horizontally & vertically with css
- To properly center the component in the page, you should use
Flexbox
orGrid
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; margin: 0; }
I hope you find it helpful ! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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