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

Price Page using Grid

PJ 110

@Kitezh1

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


Used Grid to complete this page. Overall found this okay, however wasn't sure how to centre the 'per month' text next to the price. Any suggestions? Tried putting in another nested Grid, but didn't work out how I wanted.

Community feedback

P. Ricardo 2,370

@pRicard0

Posted

Good job! Your design looks pretty good.

Some HTML tips

  • You should not use <p> to wrap two <span>.
  • You can use <em> instead of the span with the price 29$. The <em> tag is used to define emphasized text.

CSS tips

  • You can use flexbox to center the 'per month' text next to the price.
p {
display: flex;
align-items: center;
}

But of course, you need a class and to change the tag

1

@DivineUgorji

Posted

My approach for centering the "per month" with relation to the "$29" was to wrap the two of them in a container using the div element. Then target the div element class id and apply flex to it. For example; In the HTML file,

<div class="pricing-list> <p>$29<p/> <p>per month<p/> </div>

The CSS file;

.pricing-list { display: flex;
align-items: center; 
}

I do hope this helps. Good work on your project. Keep coding.

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