Design comparison
Solution retrospective
With this exercise, I learned about the grid area and how do it in @media.
.grid { display: grid; padding: 2rem; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.8rem; grid-template-areas: "a a b e" "c d d e"; }
.item1 { grid-area: a; }
.item2 { grid-area: b; }
.item3 { grid-area: c; }
.item4 { grid-area: d; }
.item5 { grid-area: e; }
@media (max-width:1000px) { .grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 1.8rem; grid-template-areas: "a" "b" "c" "d" "e"; } }
What challenges did you encounter, and how did you overcome them?The strangest thing was the image position: absolute and his @media.
.comillas { width: 115px; z-index: 1; position: absolute; right: 100px; top: 0px; }
@media (max-width:1000px) { .comillas { width: 115px; right: 30px; } }
What specific areas of your project would you like help with?Could I have solved it without using grid-template-areas?
Community feedback
- @IzykGitPosted 3 months ago
Good work!
For this project it is best if you use grid-template-columns because this project's design is structured as a grid. Doing this as a display flex would be very time consuming I image.
Keep up the good work!
0
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