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

Advice App built with HTML, CSS & JavaScript

#axios
Annika 20

@AnniK93

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

Khael 230

@i-am-Khael

Posted

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 helpful

0

Annika 20

@AnniK93

Posted

@i-am-Khael Thank you so much for your helpful comments! Hope you're having a nice day!

0

@Iamweird2

Posted

Very nice work @AnniK93 to improve your code, you can do the following

  1. 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

  2. center the container by .body{ display: flex; justify-content: center; align-items: center }

  3. 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 helpful

0

Annika 20

@AnniK93

Posted

@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 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