This is a solution to the Stats preview card component challenge on Frontend Mentor
Users should be able to:
- View the optimal layout depending on their device's screen size
- Solution URL: https://www.frontendmentor.io/solutions/stats-preview-card-component-NP1gPmTou
- Live Site URL: https://dharmik48.github.io/frontendmentor-challenge1-card/
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
Very Easy and short way to center a element in CSS!
body {
/* Make card center */
display: grid;
place-items: center;
}
The CSS variables are really usefull!! I'll be using them in every project.
element {
--variable-name: value;
}
Also the rem & em units are great help for responsive designs.
element {
property: 1rem;
}
- GitHub - Dharmik48
- Frontend Mentor - @Dharmik48