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

Recipe page (Newbie challenge) html and css

Pénélope Martin•40
@Pennymrtn
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?

I am proud I was able to remember most of what I had learn in the classes so when I was stuck on a problem I had an idea of how to solve it.

Next time I will try to make my web page responsive.

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

The hardest part was changing the style of the lists and have two different styles. The community helped by providing explanations.

What specific areas of your project would you like help with?

I would like an easy explanation of how to make a web page responsive. I still don't quite get it.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Stephen Ostler•210
    @steveostler
    Posted about 1 year ago

    Your solution looks good but does not display well on smaller screens. Try not to use width and heights on containers and let them expand to fit. Try taking the width and height rules off the gross_boite class and adding max-width:900px Take the width rule off the jolie-boite class On the img rule add width:100% and take off the margin rules

    body{
        background-color: hsl(30, 54%, 90%);
        font-family: Outfit;
        font-weight: 400;
        font-size: small;
        color:hsl(30, 10%, 34%);
        margin: 50px;
        font-size: 16px;
    }
    .grosse-boite{
        background-color:hsl(0, 0%, 100%);
        max-width: 900px;
        /* width: 720px; */
        /* height: 1525px; */
        border-radius: 25px 25px 25px 25px;
        margin: auto;
    }
    img{
        width: 100%;
        border-radius: 15px 15px 15px 15px;
        /* margin-top: 45px; */
        /* margin-left: 45px; */
        /* margin-right: 45px; */
    }
    h1{
        font-family: Young serif;
        font-weight: 400;
        margin-left: 45px;
        margin-right: 45px;
        color: hsl(24, 5%, 18%);
    }
    p{
        font-family:Outfit;
        font-weight: 400;
        font-size: small;
        margin-left: 45px;
        margin-right: 45px;
    }
    .jolie-boite{
        background-color: hsl(330, 100%, 98%);
        /* width: 630px; */
        height: 140px;
        padding-top: 0.005%;
        border-radius: 5px 5px 5px 5px;
        margin-left: 45px;
        margin-right: 45px;
    }
    h3{
        color:hsl(332, 51%, 32%);
        margin: 20px;
        height: 10px;
        border: 5px;  
        margin-left: 45px;
        margin-right: 45px; 
        font-weight: 600;
    }
    ul{ list-style: none;}
    li:before{
        display: inline-block;
        width: 2em;
        margin-left: -1em;
        margin-bottom: 0.5em;
    
    }
    li.prep-list:before{
        content: "•";
        color:hsl(332, 51%, 32%);
        font-size: 16px;
    
    }
    li.ing-list:before{
        content: "\25AA";
        color: hsl(14, 45%, 36%);
        margin-left: 15px;
        font-size: 16px;
    }
    h2{
        font-family: Young Serif;
        color: hsl(14, 45%, 36%);
        margin-left: 45px;
        margin-right: 45px;
        font-weight: 400;
    }
    ol{
        list-style:none;
        counter-reset: li;
        margin-left: 65px;
        margin-right: 65px;
    }
    ol li::before{
        font-weight: 600;
        font-size: 16px;
        display: inline-block;
        margin-left: -2.5em;
        margin-right: 0.5em;
        content: counter(li)". ";
        color:hsl(14, 45%, 36%);
        display:block;
        margin-bottom: -25px;
        line-height: 2rem;
        font-size: 16px;
    }
    li {counter-increment : li}
    table{
        border-collapse: collapse;
        width: 100%;
        margin-left: 45px;
        margin-right: 45px;
        margin-bottom: 50px;
        
    }
    tr{
        border-bottom: 1px
         solid hsl(30, 18%, 87%);
           
    }
    tr.last-child{
        border-bottom: 0;
    }
    th{
        font-weight: 500;
        text-align: left;
        color:hsl(30, 10%, 34%);
        padding-left:20px;
    }
    td{
        font-weight: 600;
        color: hsl(14, 45%, 36%);
        padding:10px
    }
    .last-td{
        border-bottom:none
    }
    hr{
        border: 0.5pt solid hsl(30, 18%, 87%);
        margin-left: 20px;
        margin-right: 20px;
    }
    
    Marked as helpful
  • Dylan de Bruijn•3,220
    @DylandeBruijn
    Posted about 1 year ago

    @Pennymrtn

    Hiya! 👋

    Congratulations on your solution, it looks very close to the design! I can tell you put a lot of effort into it.

    Things you could improve ✍️

    • Try experimenting with the CSS layout tool Flexbox, it will help you greatly structuring elements on your webpage.

    • You could add a min-height: 100vh to your body element so it takes up the full height of the viewport while still being able to grow when the content inside it grows.

    • Try experimenting with CSS variables, they help you make your CSS values more reusable across your code.

    • I suggest using clear descriptive CSS classes like .recipe, .recipe-title and .recipe-description.

    • Try using semantic HTML elements like main, section and article.

    • I suggest not putting a fixed height and width on an element. If the content in your element grows you'll run into overflow issues.

    • I see you use a lot of margin where padding should be used.

    Do you have any specific questions about responsive design? In this case you can make your solution responsive by using a couple media queries and making your container fluid.

    I hope you find my feedback valuable, and I would appreciate it greatly if you could mark my comment as helpful if it was! 🌟

    Let me know if you have more questions and I'll do my best to answer them. 🙋‍♂️

    Happy coding! 😎

    Marked as helpful

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