This is a solution to the Four card feature section 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 site depending on their device's screen size
- Solution URL:(https://github.com/thecodefan/Four-card-feature-section)
- Live Site URL: https://thecodefan.github.io/Four-card-feature-section
Using a mobile first approach, i focused on putting the elements where they are needed, and adding style after.
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
Using flexbox in order to position the four cards in the way they are was challenging, but doign it with only flexbox was very interesting too.
.proud-of-this-css {
.boxesContainer {
width: 1200px;
height: 550px;
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
.rowOne,
.rowTwo,
.rowThree {
display: flex;
flex-direction: column;
flex-grow: 1;
align-items: center;
justify-content: center;
}
.rowTwo {
gap: 20px;
}
}Though there is responsiveness for sizes of 375 below and above, further media queries for other sizes will be needed
