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

Recipe page using HTML and CSS

Tolulope Oluwabukunmi•240
@TheTreeveloper
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have some problems making this responsive for mobile, any help would be really appreciated guys!!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Marzuk Sanni•1,360
    @Zukizuk
    Posted over 1 year ago

    Hello there

    Your solution looks nice

    I have few suggestion that i think might interest you.

    You can make it responsive by using media queries like you did but use this instead

    @media only screen and (max-width: 480px) {
        /* Media query styles */
    }
    

    The max-device-width targets the device's screen width, and it might not work as expected for all devices. Instead, use max-width to target the width of the viewport.

    Better still you can start by doing the mobile design first and using media queries for the desktop(mobile first approach) which is also a good practice in writing you styles.

    @media  (min-width: 64rem) {
        /* Desktop styles */
    }
    

    Also put this

        *{
            margin: 0;
            padding: 0;
        }
    

    at the very top of your css not in the media queries. You need it in both mobile and desktop version.

    Again, consider using semantic html like <main></main> for the div with the class main.

    Marked as helpful

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