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

Responsive Deign using HTML and CSS

Manny Andem•230
@mannyAndem
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Valeriia•200
    @Magic1vy
    Posted about 2 years ago

    Hello, @mannyAndem! 👋

    You did an amazing job in this challenge!

    Here are some tips that you can find helpful for improving your code:

    1.In your "gallery-section", you can use the <picture> tag to provide different images for different device widths instead of using 2 separate <img> tags. You can learn more about this tag here 📗

    2.To speed up website loading times, it's better to import Google Fonts in the HTML file rather than in CSS. You can read more about this in this article 📙

    3.Use shorthand properties in your CSS background, like this:

    .photography {
      background: url("images/mobile/image-photography.jpg") no-repeat / cover center;
    }
    

    instead of:

    .photography {
      background: url("images/mobile/image-photography.jpg") 
      background-size: 100%;
      background-repeat: no-repeat;
      background-position: center;
    }
    

    The /cover value sets the background-size to "cover" and the other properties are self-explanatory.

    4.When changing the background image in media queries, use only background-image instead of background to avoid applying other properties in the background shorthand by default. You can learn more about shorthand properties in CSS from this article on MDN Web Docs 📘

    I hope you find this helpful! Happy 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