Recipe Page using Flexbox and Media Query for mobile responsiveness

Solution retrospective
I'm most proud of successfully building a clean, responsive layout that closely matches the provided design on both mobile and desktop. It was especially rewarding to see how the page adapted nicely across screen sizes using media queries—this was my first time implementing them, and it made a huge difference in the final result.
If I were to do it differently next time, I’d focus more on planning the structure and spacing details before jumping into the code. I initially struggled with getting spacing between sections like the nutrition facts to match the design perfectly. Next time, I’ll reference the design more methodically and adhere to a saying that I just learned being "Don't chase the Pixel-Perfect dream" and focus on writing clean and effective code.
What challenges did you encounter, and how did you overcome them?One of the main challenges was handling spacing and borders in the nutrition section. It was tricky to match the visual spacing exactly like the design, especially making sure there was no top border above "Calories" and no bottom border below "Fat," while keeping consistent spacing between the middle rows.
I overcame this by using targeted CSS selectors and some creative thinking, eventually settling on adding classes like .nutrition div:first-child and .nutrition div:last-child to manually control borders only where needed. This wasn’t the most elegant solution, but it got the job done effectively.
What specific areas of your project would you like help with?I’d love feedback on how to better manage spacing and border styles more efficiently, particularly in sections like the nutrition facts where a cleaner CSS solution might exist. Also, suggestions on how to simplify or refactor my responsive styles would be appreciated, especially now that I'm starting to explore media queries.
I'd also be open to tips on improving overall CSS organization and best practices, like when to use utility classes vs. semantic ones, and how to better structure styles as projects grow more complex.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Gabriel Rodriguez Perez's solution.
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