Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Responsive Recipe Main Page using CSS Flexbox

accessibility
Tushar Kaundal•220
@TusharKaundal
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?

Was able to style and provide good design to nutrition table section after learing from different resources and applying it here to get better result just by using CSS property

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

While going through development for this page came across nutrition article where table is to be formed so learned CSS property nth-child() and nth-last-child().Which helped me target/select the column/rows and did styling so looks good.

Below are the code snippets used to provide style to nutrition article :


  
    Calories
    277kcal
  
  
    Carbs
    0g
  
  
    Protein
    20g
  
  
    Fat
    22g
  

.nutrition-table {
  padding: 0px 32px;
  border-collapse: collapse;
}

tr:nth-child(-n + 3) td {
  border-bottom: 2px solid var(--stone-150);
  padding-bottom: 12px;
}

tr:nth-last-child(-n + 3) td {
  padding-top: 12px;
}

tr td:nth-child(1) {
  padding-left: 32px;
}

### What specific areas of your project would you like help with?
how to make this design more responsive like section,typography changes with different viewport
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Tushar Kaundal'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

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