There is a block:
<div data-index="24" style="border-radius: 0px; padding: 20px; background: none 0% 0% repeat scroll rgb(0, 0, 0); transform: scale(0, 0); transition-property: -moz-transform; transform-origin: 0% 50% 0px; width: 380px; left: 563.906px; top: 321.188px; display: block;" class="hs-tooltip"> <div style="border-right-color: rgba(0, 0, 0, 1);" class="hs-arrow hs-arrow-left"></div> <div class="hs-tooltip-buffer hs-tooltip-buffer-left "></div> <h3 style="color: #2b2a2c;font-size: 20px;font-family: sans-serif;font-weight: 700;line-height: 30px;margin-bottom: 20px;">Infused Chocolate</h3> <p style="color: #2b2a2c;font-size: 15px;font-family: serif;font-weight: 300;line-height: 25px;"><img src="/wp-content/uploads/2016/07/Image-28-Chocolates.jpg"><br>Discover a wide selection of infused chocolates, including major brands and artisan pieces in both traditional doses and microdoses.<br><a href="#">View The Menu</a></p><i class="close"></i> </div> It is displayed as a popup, it is necessary that it is always displayed in the center of the browser window. Its width is fixed 380px, height - dynamic. It is also necessary that when scrolling up or down, he hid.
I did it, it does not work
.homepage .pin-overlay + .hs-tooltip { position: fixed; top: 50%!important; left: 50%!important; margin-top: -25%; margin-left: -190px; } I have even found:
- window.innerWidth; // returns the width of the window
- window.innerHeight; // returns the height of the window
center will most likely return window.innerWidth / 2; and window.innerHeight / 2;
fixedhere is meaningless, because you need to hide when scrolling. Must be absolutely positioned - Klimenkomud