@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.
HEADINGS β οΈ:
- This solution has also generated accessibility error report due to lack of level-one heading
<h1>
- Every site must want at least one
h1
element identifying and describing the main content of the page.
- An
h1
heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
- So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a
sr-only
class to hide it from visual users (it will be useful for visually impaired users)
CSS π¨:
- let me explain, How you can easily center the component for better layout.
- 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
.card {
margin: 80px auto;
}
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
@andres-av
Posted
@0xAbdulKhalid
Wow! you went above and beyond on this feedback, I really appreciate all the information you shared with me because those were topics I did not know of.
Thanks to this I have homework now and I know it will improve my coding skills in the future.
Once again, Thank you so much!!