Share Posted April 8, 2021 Hi all I'm trying to create a 2x2 grid of divs. When a div is clicked it will fill up the entire container of divs and reveal some content. I have this working using the FLIP plugin, but I'm noticing a weird jump when downsizing every box with the last one being an exception. For some reason, the last one (the orange box) grows and shrinks as intended. I'm achieving this by using unset on the class that is being applied to the box that is full screen. .fullScreened{ position:absolute; top:0; bottom:0; right:0; left:0; z-index: 10; grid-column-start:unset !important; grid-column-end:unset !important; grid-row-start:unset !important; grid-row-end:unset !important; } Which feels kind of hacky but I'm not sure of another solution. See the Pen 1130deaaea42cee23356c3a6e1441f3c?editors=1010 by DDI-Web-Team (@DDI-Web-Team) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted April 8, 2021 I think that's just a z-index thing, right? Totally unrelated to Flip/GSAP. In other words, you've got the "fullScreened" element with z-index: 10 but as soon as you flip it back, it has the same z-index as all the other elements, thus their native stacking order takes over and the ones on top obscure the ones below. Is this what you're looking for?: See the Pen 9f3eceb5fb98230d32fdd982ad695932?editors=0010 by GreenSock (@GreenSock) on CodePen 2 Link to comment Share on other sites More sharing options...
Author Share Posted April 8, 2021 Hi Jack! 😁 Yes, you hit the nail on the head. I hadn't really considered how the z-index was causing this. Your solution is perfect. Thank you so much! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now