Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Responsive, Less CSS

Camille•130
@fyrfli
A solution to the Advice generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • romila•3,550
    @romila2003
    Posted over 2 years ago

    Hi Camille,

    Congratulations 🎉 for completing this challenge, your API component looks great and is functional. Also, it is great that you used the right semantic for your code. I have some suggestions, if you don't mind.

    1. You can wrap your button within a button tag and can store the image within it, instead of a p tag as p tags should contain texts instead. Also, you can give the button, a cursor property to make it look more like a button e.g. cursor: pointer;
    2. Instead of using a media query, you can give the .card, a max-width property e.g.
    .card {
       max-width: 540px;
       width: 100%;
    }
    
    body {
       margin: 0 10px;
    }
    

    I gave the body a margin property to prevent the card from touching the side of the screen.

    Rather than using the margin-top property, you can use the flex property to center the card instead e.g.

    body {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
    }
    

    Overall, great work and wish you the best for your future projects so keep coding 👍.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub