@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 withempty
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
orpadding
.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states
- 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;
}
- Now remove these styles, after removing you can able to see the changes
.container {
margin: 10vh auto;
}
- And another thing that you used
40vw
forwidth
of.container
, usingvw
in components may cause sizing issues. Instead40vw
i recommend you to apply40em
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
@mannyAndem
Posted
@0xAbdulKhalid
Thanks a lot for the detailed feedback Abdul.
I'd implement these going further :)