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 component

#accessibility

@Dribbz

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


Hi there 👋🏼, I’m Dribbz and this is my solution for this challenge. 🚀

🛠️ Built With:

⚡️HTML5 ⚡️Vanilla CSS

Any Suggestions On how to improve my code is Welcomed 🙌🏼

Thank you !✌️

Community feedback

Vanza Setia 27,795

@vanzasetia

Posted

Hi, Dribbz! 👋

A couple of suggestions:

  • No extra element: You do not need an extra <div> element—<div class="grid-container">—to wrap all the card sections. You can use the <body> element as the grid container of the card or the <main> element. Then, use the <main> element as the .grid-container.
  • Use appropriate element: The content below the "Why Us" text is a list of reasons, so you should use a list element.
  • Remove default styling: By default, <p> elements will have font-size: 1rem. You can remove font-size: 1rem from the .description styling.

I hope my suggestions help you. Have fun coding! 😄

Marked as helpful

0

@Dribbz

Posted

Thank you for reaching out

Regarding the <main> element i heard somewhere on YouTube while I was learning that it was bad practice to apply a grid container to main rather using <div class=“container”> I will research it further and if it’s okay I will edit it in my code

Using the ul li element makes sense in this context so I will be changing that

I will also remove the default styling @vanzasetia

0
Vanza Setia 27,795

@vanzasetia

Posted

@Dribbz

You are welcome!

I think about avoiding the <main> element as a grid container depending on the context. I usually will have a <div class="container">. In this case, I do not see any issue with making the <main> element as a grid container. Also, you will end up with less code by doing it.

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