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 card using CSS Grid

Jeremyβ€’ 140

@Duck322

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


Not sure if the background works, but I thought it needed something!

Community feedback

Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

Hi Jeremy, how are you? Welcome to the front-end mentor community! I really liked the result of your project, but I have some tips that I think you will enjoy:

A good practice to center content is using grid or flex-box, avoid using margin or padding to make placements, use only in the latter case! we can do it like this:

Flex-box:

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

GRID

body {
    display: grid;
    min height: 100vh;
    place-content: center;
}

The rest is great!

I hope it helps... πŸ‘

Marked as helpful

0

@VCarames

Posted

Hey there! πŸ‘‹ Here are some suggestions to help improve your code:

  • To properly center your content to your page, you will want to add the following to your body element (this method uses CSS Grid):
body {
    min-height: 100vh;
    display: grid;
    place-content: center;
}

More Info:πŸ“š

[Centering in CSS][https://moderncss.dev/complete-guide-to-centering-in-css/]

  • The β€œ30-day, hassle-free money back guarantee” is not a heading. It should instead be wrapped in a paragraph element.
  • The button was created with the incorrect element. When users click on the button they should directed to a different part of your site; the anchor element will allow this to happen.
  • The β€œWhy Us” list needs to be created using an unordered list element along with the list item element.
  • Your CSS Reset is extremely bare and being underutilized. To fully maximize your CSS reset, you want to add more to it.

Here are few CSS Resets that you can look at and use to create your own or just copy and paste one that is already prebuilt.

https://www.joshwcomeau.com/css/custom-css-reset/

https://meyerweb.com/eric/tools/css/reset/

http://html5doctor.com/html-5-reset-stylesheet/

If you have any questions or need further clarification, feel free to reach out to me.

Happy Coding! πŸ‚πŸ¦ƒ

Marked as helpful

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