testimonials-grid-section-main-component.
Design comparison
Solution retrospective
the site don't work on mobile-design
Community feedback
- @correlucasPosted over 2 years ago
πΎHello MAHMOUD, congratulations for your solution!
The best approach for this solution is using
GRID
instead ofFLEX
. To build this with flex you'll much more work and code to write in comparison with grid.The best way to build this is inserting the property
display: grid;
inside the container, onegeneral class
for the card setting all thepaddings
andwidth
.Inside the container you should add
display: grid;
andgrid-template-columns: repeat(4, 1fr); max-width: 1110px;
to create a grid with 4 columns and maximum width of 1110px.Then you should use the property
column-span: span 2
androw-span: span 2;
for the columns that are bigger than the others for example, the purple and black card and the vertical white card.When you finish the desktop version, you can add a
@media query
changing thegrid-template-columns: 1fr;
for a single column design.If you're not familiar to GRID I suggest you read the documentation: https://www.w3schools.com/css/css_grid.asp
I build my solution using the GRID approach, if you want to use my code as a reference, here's the solution: https://www.frontendmentor.io/solutions/testimonials-grid-section-vanilla-css-focus-effect-custom-design-e5bIzU3vZN
Hope it helps, congratulations!
Marked as helpful0
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