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

Beshoy Maherβ€’ 150

@BeshoyMaherr

Desktop design screenshot for the Single price grid component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

CSS 🎨:

  • Looks like the component has been centered properly. But the issue is the content inside the body causes overflow on smaller screens and let people scroll the content, this issue want to be cleared
  • Now set margin for body, after setting you can able to see the changes
body {
   margin: 0;
}
  • Now the overflow of content has been cleared

.

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

Happy coding!

Marked as helpful

0

Beshoy Maherβ€’ 150

@BeshoyMaherr

Posted

Thanks a lot @0xAbdulKhalid

0
Panjiβ€’ 2,110

@pperdana

Posted

Hi, Well done on completing the challenge! πŸ‘

  • I have other recommendation for your code to center an element both horizontally and vertically.

Using relative position

Since you use flexbox to center element both horizontally and vertically, you can also use relative positino to do it.

Set the position property of the child element to "absolute" and use the "top", "bottom", "left", and "right" properties to center the element both horizontally and vertically. For example:

.parent {
  position: relative;
}

.child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* other styles for the child element */
}

I hope this information was beneficial for you! 😊

Happy codingπŸ€–

0

Beshoy Maherβ€’ 150

@BeshoyMaherr

Posted

I know it, Thanks@Panji200

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