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

css

Phantuan2004•40
@Phantuan2004
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adam•340
    @nadam-design
    Posted 7 months ago

    Hi @Phantuan2004!

    If I may, I'd like to highlight a few things that could be optimized:

    • The build isn't fully responsive: You assigned a fixed width to the card. This can be avoided by using max-width like this: max-width: 738px; width: 100%;. This way, the card element will behave responsively.
    • Card height: You've set a fixed height for the card, which is unnecessary in this case. The content should determine the overall height.
    • Border radius are inconsistent: The Preparation time block is missing a border radius, while others have it, but differs from what is shown in the design.
    • Typography: Font sizes don't align with the design, and the spacing between the list items (<li> tags) is also off.

    The devil is in the details—pay close attention to these! This is how you master precise and accurate site building.

    If I understand correctly, you worked from a static JPG, which is more challenging and time-consuming than building from a Figma file. One of the key roles of a frontend builder is to faithfully follow the design. If you're working from a JPG, try opening the file in Photoshop and manually measuring distances, border radiuses, font sizes, etc. It’s meticulous work, but necessary for achieving the best result if no other option is available.

    After completing enough builds, your eye will adjust, and you'll start to notice these details instinctively, producing almost perfect results at a glance. Until then, it’s all about measuring by hand.

    You’ve got this—keep going! 😊

  • P
    pankajb085•290
    @pankajb085
    Posted 7 months ago

    The code is well structured. But needs a few improvements. Please always separate the CSS file from the HTML file as it increases the size of the HTML page and becomes difficult to read. Plus make the page responsive. It's only looking good on desktop design. Font sizes and colors also differ from actual design.

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

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

Oops! 😬

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

Log in with GitHub