Design comparison
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
- @pRicard0Posted about 1 year ago
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 - You should not use
- @DivineUgorjiPosted about 1 year ago
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 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