Design comparison
Solution retrospective
I need help with the Footer overlay section. It seems that the overlay covered the child elements only in the tablet and mobile layout, but not my desktop layout.
I played around with the Z-Index but I'm not able to figure it out. I need your help guys.
Community feedback
- @WayneHaworthPosted over 3 years ago
It is because you have "display: block;" on mobile/tablet sizes.
Change this to flex for all widths (and you'll probably have to switch the flex-direction to column too) to fix this.
Alternatively, you could not use a :before as an overlay. I generally stay away from :before and :after if possible as they can be tricky. If you check my solution: https://waynehaworth.github.io/FEM-Meet-Landing-Page/ I used a semi transparent background gradient over the top of a background image directly on the <footer>, like this:
background: linear-gradient(rgba(77, 150, 168, 0.9), rgba(77, 150, 168, 0.9)), url(../images/image-footer-tablet.jpg);
0@khalisabrahmanPosted over 3 years ago@WayneHaworth
Alright! Never would have thought that "display: block" would affect the issue with the z-index. Thanks for the tips. Really appreciate it.
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