This is a solution to the Single price grid component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the component depending on their device's screen size
- See a hover state on desktop for the Sign Up call-to-action
- Solution URL: https://github.com/andysmithdev/Single-Price-Grid-Component
- Live Site URL: https://andysmithdev.github.io/Single-Price-Grid-Component/
- CSS
The hardest part for me was vertically centering the 'per month' text. It took a while to release that you needed to add the 'vertical-align: middle;' property to the 'price' span rather than the 'per month' span. No idea why this is, makes no sense.
.price {
font-size: 32px;
font-weight: 700;
vertical-align: middle; /* No idea why this needs to be here to align .permonth correctly */
line-height: normal;
}- Frontend Mentor - @andysmithdev
