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

Single price grid commponents (html and css)

rajendra2708578β€’ 90

@rajendra2708578

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


This is not responsive. Used HTML and CSS. Any kind of suggestions are welcomed.

Community feedback

@MelvinAguilar

Posted

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

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

  • Wrap the page's whole main content in the <main> tag.
  • For specificity reasons you should work with classes instead of ids because they are more reusable. You can use ids to work with JavaScript, but you should use classes to style your elements. You can read more about this here πŸ“˜.
  • The <br> tag is often used to create line breaks, but it doesn't convey any semantic meaning. Use <ul> and <li> for the content under "Why Us": Since the content is a list of items, it's more semantically correct to use an unordered list (<ul>) and list items (<li>) instead of using paragraph (<p>).

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

1
Josh Michaelβ€’ 1,050

@joshmichael23

Posted

Great job on your project. You can make it better by using the font given in the style-guide.md.

What I usually do is go to fonts.google.com then search for the font. Add the necessary font-weights by clicking on the + and then click the cart on the top right. You can then use the <link> or the @import under the Use on the web section depending on your preference. Hope it helps :)

Marked as helpful

1
Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

Hello @rajendra2708578!

Your project looks great!

I noticed that you used position to place the card in the middle of the page. Here's two very efficient ways to center the card:

  • You can 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;
}
  • Or you can apply this to the element you wanna center (works well with projects with only one centered element, like this one):
.element {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

Other details to improve your project and make it look even closer to the original design:

  • Check the style-guide file to check what's the recommended font-family for the project.
  • Add a border-radius to the div#card. Something like border-radius: 6px; overflow: hidden; is enough;
  • Instead of using div for the main content, use main. It won't change anything visually but it makes your HTML code more semantic and improves SEO optimization and acessibility.

I hope it helps!

Other than those details, your solution is great!

Happy New Year 😊

Marked as helpful

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