Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 3 months ago

Responsive layout using media queries

pure-css
shaheerahmedkhan•80
@shaheerahmedkhan11
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am proud that i used html tables effectively and next time i would like to try CSS Grid

What challenges did you encounter, and how did you overcome them?

I couldn't remove the borders on the last element of the table. I surfed the web for some time and eventually fixed this problem.

What specific areas of your project would you like help with?

I would like help with CSS particularly because I am rather new at it.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • MEHNOOR SHAHBAZ•720
    @Mahnoor366880
    Posted 3 months ago

    Your solution is looking great! You're on the right track, and I can see that you've put in solid effort. Here are a few improvements to make it match the required result more closely:

    1. Background Color Adjustment

    The required result has a soft beige background, while your solution has a light pinkish shade. Update the background color to match the required result.

    You can adjust it in your CSS:

    body { background-color: #f3e5d8; /* Use this beige tone */ }

    1. Font and Text Styling

    The font in the required result looks slightly bolder, and the headings have a darker shade. Make sure you are using the correct font weight and colors.

    Example for the heading:

    h1 { font-weight: 700; color: #302d2c; /* Darker shade for better contrast */ }

    1. Card Shadow and Border Radius

    The required result has a smoother, slightly rounded card with a subtle shadow effect. Add the correct border radius and shadow for a polished look.

    Update your .card styling:

    .card { border-radius: 12px; /* More rounded corners / box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); / Subtle shadow */ }

    1. Spacing and Padding Adjustments

    The spacing between sections (especially between "Preparation time" and "Ingredients") needs slight fine-tuning.

    Increase the bottom margin of the "Preparation time" section:

    .preparation-time { margin-bottom: 20px; /* Adjust for better spacing */ }

    1. Nutrition Table Styling

    In the required result, the nutrition table has slightly different padding and text alignment.

    Adjust it like this:

    table { width: 100%; text-align: left; border-collapse: collapse; } td, th { padding: 10px; }

    You're doing an awesome job! These small refinements will bring your solution even closer to perfection. Keep up the great work!

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

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

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

Log in with GitHub