Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

A recipe page using CSS Flexbox

@elameendaiyabu

Desktop design screenshot for the Recipe page coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  • I definitely have repeated and redundant CSS code. How do you go about it to ensure minimal CSS code?
  • My code is definitely not mobile responsive. Any help on how to go about that would be appreciated.

Community feedback

P
p-tam 170

@p-tam

Posted

Nice work on the usage of semantic HTML tags and structuring your code.

In regards to the DRY principle I would suggest to avoid using id as a selector for the CSS styling where possible. An example includes:

#ingredients,
#instructions,
#nutrition {
  padding: 20px;
}

Instead, to create reusable styling you can do

.section-padding {
    padding: 20px
}

This way you can apply that CSS class to all the sections that require this styling without creating a bunch of IDs.

Marked as helpful

1

@elameendaiyabu

Posted

@p-tam Thank you for the feedback. I see the point you made and I will definitely improve on it.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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