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

Pricing thing

itsCoolguy 180

@itsCoolguy

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

Hassia Issah 50,670

@Hassiai

Posted

Replace <div id="card"> with the main tag, <h2> with <h1> and <h3> and <h4> with <h2> to fix the accessibility issue. click here for more on web-accessibility and semantic html

To center #card on the page using flexbox or grid instead of margin, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

USING FLEXBOX:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
USING GRID:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Use the colors that were given in the styleguide.md found in the zip folder you downloaded.

There is no need to give #card an the sections height values rather give the sections the same padding values for the sides. this will prevent the content from overflowing.

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0
K.Damsith 330

@Damsithcoder

Posted

Well done .you have a simple mistake , if you want ,you can use this code block

body{ display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: 1440px; min-height: 100vh; background-color: hsl(204, 43%, 93%);

}

I think this will help you. keep 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