Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.68 KB

File metadata and controls

56 lines (36 loc) · 1.68 KB

Frontend Mentor - Single price grid component solution

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.

Table of contents

Overview

The challenge

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

Screenshot

Links

My process

Built with

  • CSS

What I learned

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;
}

Author