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

Responsive recipe page using HTML & CSS

P
Kyle Mulqueen•400
@kmulqueen
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?

Most Proud Of

I'm most proud of implementing the ordered list styling that maintains both semantic HTML structure and visual design requirements. Finding a way to keep the list accessible while having the text align properly with wrapped content was a satisfying challenge to solve.

Would Do Differently

If I were to start over, I would:

  1. Plan my CSS architecture more carefully before beginning, perhaps using a methodology like BEM or CUBE CSS.
  2. Create a comprehensive design system with CSS variables for spacing, typography, and colors at the start of the project.
  3. Take a more mobile-first approach to the responsive design.
  4. Use CSS Grid for the overall layout instead of relying heavily on padding and margins.
What challenges did you encounter, and how did you overcome them? Challenges Encountered

List Styling Alignment

The biggest challenge was styling the ordered and unordered lists to maintain proper text alignment when content wrapped to multiple lines.

How I overcame it: I learned about CSS counters and absolute positioning techniques. By using position: absolute for the list markers and appropriate padding on the list items, I was able to achieve the desired visual effect while maintaining semantic HTML.

Horizontal Line Placement

Placing the <hr> elements at the bottom of sections with padding was tricky.

How I overcame it: I used absolute positioning to place the horizontal rules exactly where needed:

section {
  position: relative;
  padding: 20px;
}

section hr {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
}

Text Styling vs. Semantics

Balancing visual styling requirements with semantic HTML was sometimes challenging, especially when deciding between elements like <strong>, <b>, or styled <span> elements.

How I overcame it: I researched the semantic meaning of various HTML elements and made decisions based on the actual content meaning rather than just visual appearance.

What specific areas of your project would you like help with? Areas I'd Like Help With
  1. Responsive Design Feedback - I'd appreciate input on how my layout adapts to different screen sizes and if there are better practices I could implement.

  2. CSS Organization - I'm interested in learning better ways to organize my CSS for maintainability as projects grow larger.

  3. Performance Optimization - Are there any ways I could optimize my HTML/CSS for better performance?

  4. Accessibility Review - I've focused on semantic HTML, but I'd like feedback on other accessibility aspects I might have missed.

  5. Browser Compatibility - I'd like to ensure my solution works across all modern browsers and gracefully degrades in older ones.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Mnqobi Thusi•150
    @CodexLoop
    Posted 3 months ago

    Responsive Design: The layout adapts well, but consider adding a mobile-first approach and testing for smaller devices to ensure the text and images scale smoothly. Using media queries might enhance this.

    CSS Organization: The design is clean, but consider using a CSS methodology like BEM for better scalability. You could also look into using CSS variables for colors and spacing.

    Performance & Accessibility: For performance, minimize CSS and JavaScript files, and ensure all images are optimized. For accessibility, add alt text for images and ensure your forms are labeled properly.

    Browser Compatibility: It looks great in modern browsers, but check older ones (like IE11) for compatibility issues. Tools like Autoprefixer can help with that.

    You’ve made solid progress! Keep refining these areas for even better performance and scalability.

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