Design comparison
Community feedback
- @i-am-KhaelPosted over 2 years ago
To resolve those accessibility issue,
- use an h1 instead of h3
- use main for the <main></main> landmark, then <section></section> to set landmark, then use div(s) inside section element.
and you can change api endpoint to https:// api.adviceslip.com/advice/id , then using Math.floor(Math.random * 255) to generate a random number for the id.
Great work and effort, though.
Marked as helpful0@AnniK93Posted over 2 years ago@i-am-Khael Thank you so much for your helpful comments! Hope you're having a nice day!
0 - @Iamweird2Posted over 2 years ago
Very nice work @AnniK93 to improve your code, you can do the following
-
use class selector allthrough and avoid styling elements via tag name and id to avoid issues with specificity. for example, add a class(.body) to the body element then
-
center the container by
.body{ display: flex; justify-content: center; align-items: center }
-
avoid using static units for font sizes such as pixels but use units that resizes based on browser size such as em or rem.
I hope this helps. Have a nice day.
Marked as helpful0@AnniK93Posted over 2 years ago@Iamweird2 Amazing! Thank you for your helpful comments! Hope you have a nice day too.
0 -
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