Pop up boxes relative to window, not page


I’m trying to figure out how to make a popup div box to appear relative to the window, not the page. If you look at my site, when you click on a mugshot a popup bio box appears. Like so:

This looks great in the first two rows. When you get to the last rows, the bio boxes appears off screen. Like so:

This is because the bio boxes position are set to “Absolute” and centered to the page. Is there a way to set the boxes so that they open up relative to where you click on the mugshot? I can’t seem to figure it out.



Here is my public share link: https://preview.webflow.com/preview/oakland-ghost-ship-deaths-0eb7a1a56d4fe?preview=c7309baf4c7ebeace48fc0fb6b3fe7a6
(how to access public share link)

Hum yes i have an idea !

Ok, so first put all your divs in a parent div set to relative

Now, put your relative div in another div set to fixed top.

Now i guess the idea is to fix the height of this Bio container div in pixel and positionn.

Scroll Overflow on Bio Container

and it’s working !

Wow but designer is getting crazy when adding scrool overflow

Maybe too much for overflow, but i’m not sure it’s working perfectly in preview.

You can try to display none before animating, in the css panel not in initial appearance so designer won’t have to show every content. I guess :sweat_smile:

You’re awesome. This worked. The site is at http://extras.mercurynews.com/ghostship/ if you are curious.

Yay great to hear :slight_smile: Cool site Gj ! Maybe you want the close button to be fixed so people don’t have to scroll up to find it :wink:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.