Responsive layout using CSS grid

Solution retrospective
I completed this project pretty fast! I think I'm getting the hang of css grid. I've come to appreciate grid-template-areas and grid-area properties, they make CSS grid way easier.
What challenges did you encounter, and how did you overcome them?The fig file did not reveal a lot about the design requirements, I had to click around a lot to try and find certain design properties. For example, I had a lot of trouble trying to find the box shadow properties in the fig file. Also, I had some trouble with the quotation image and how to make it responsive with the different screen sizes.
What specific areas of your project would you like help with?I would like further help on how to make position: absolute and position: relative images responsive based on the screen size. I utilized multiple media queries and breaks as to where it should be based on the design, so it doesn't overflow out of the container it's attached to; but I'm sure there's probably an easier way. Please feel free to let me know!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @JustANipple
Hi @krru09, you've made a nice work, good job!
For the image part, you could set a left and a right at 0px so you can set a margin auto to center it. Then just use transform: translateX to move it. This should keep it in the div through all the breakpoints.
But there's another option. Instead of using the img tag, you could just use a background image for the div and position it at your needs, so it never overflows
Check my solution if you want to see it live
Marked as helpful
Join 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