Single price grid component made with HTML and CSS-Grid
Design comparison
Solution retrospective
It was easy to make but It took little more time making some of individual lines to have different colors. For this I had to write separate line for some paragraphs to have different color. Is there other way to do it by using less code?
Community feedback
- @HassiaiPosted almost 2 years ago
To center the content on a page specify the following in the body: body { display: grid; place-items: center; min-height:100vh} or body{ display: flex; align-items: center; justify-content: center; min-height: 100vh;} There is no need to give the main a border: value. no need to specify margin and padding value. Give the main a width not max-width and specify the following: main{ width: 600px; display: grid; grid-template-column: 1fr 1fr;} Use rem and em as the unit for the padding , margin and width value; Remove the margin-top value for h3 h4 and content3 p After your media query, reduce the width for the main and specify display: block; main{width 300px; display: block;} and give the body a width percentage value of 90% or 80%. body{width:80%} change the background color of the page Hope am helpful HAPPY CODING
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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