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

Recipe page Challenge

@thilisadiki

Desktop design screenshot for the Recipe page coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


need assistance with centering the card

Community feedback

P
Jenna 230

@NandiniCooppen

Posted

Hello thilisadiki,

Congrats on completing your first challenge👏

To center the card properly, you might want to use CSS flexbox or grid.

Example using CSS Flexbox:

Add the following code to the body:

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

You can thus remove the margin from your style :

.main-card {
    margin: 6rem auto;
}

Helpful links:

CSS Flexbox :

Link1

Link2

CSS grid:

Link1

You might want to have a look at the following as well:

Read about accessibility here

Read about semantics here

Read about headings here

I hope these will be helpful to you 😉

Good luck going forward and happy coding 🙂

0

@devid8642

Posted

Hello, firstly congratulations on the solution and continue improving it (I see that you have already centered the card), but I would like to bring a few more points for you to consider:

Regarding the structuring of the content, that is, the HTML: consider using appropriate titles according to their semantics and not the design they present, as this can be adjusted with CSS. So the first title of the page, for semantic and SEO reasons, could be an <h1> instead of an <h2>. Another important point is the table, consider using <th> instead of <td> for table headers.

Regarding design and layout, I believe you are still working on it, if you have any questions feel free to comment here.

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