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

responsive price grid component - semantic html, css grid

Christinaโ€ข 90

@teenabobeena

Desktop design screenshot for the Single price grid component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any and all feedback encouraged and appreciated.

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • Instead of using two media queries to modify the width of the main element, it's more advisable to use a fixed max-width of 900px to prevent it from stretching too much. Additionally, set a margin of 0.5rem to avoid it touching the edges of the screen on mobile devices.
main {
    /* width: 85vw; */
    max-width: 900px;
    margin: 0.5rem;
}
  • You can use classes instead of using IDs and nth-child since they are less specific.
  • You can enclose the price and text in a single paragraph to make it read continuously in screen readers: <p class="price"><span class="white">$29</span> per month</p>.

I hope you find it useful! ๐Ÿ˜„

Happy coding!

Marked as helpful

1

Christinaโ€ข 90

@teenabobeena

Posted

@MelvinAguilar thanks so much for the suggestions! I will keep them in mind for future projects.

0
Daniel ๐Ÿ›ธโ€ข 44,230

@danielmrz-dev

Posted

Hello Christina!

Your project looks great!

I noticed that you used margin to place the card in the middle of the page. Here's a very efficient way to center the card (vertically and horizontally):

  • Apply this to the body (in order to work properly, you can't use position or margins):
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
  • Also, since the sign up button is a clickable element, it's nice to add cursor: pointer to it.

I hope it helps!

Other than that, great job!

Marked as helpful

1

Christinaโ€ข 90

@teenabobeena

Posted

@danielmrz-dev I updated my code as you suggested and it worked great. Thank you so much!

1

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