#101217
Hristofor
Member

Hi edwardsmarkf,
The window is moving because it is positioned via CSS to always be in the center of the page. When you are zooming on/out you are changing the size of the page thus the window is also repositioning to be in the center. If the Smart.Window hasn’t been resized or dragged ( static window ) it’s size and position can be set via CSS. If it has been manipulated then via inline Javascript. By default Smart.Window component is positioned to be in the center via the following CSS styles:


 top: calc(50% - var(--smart-window-default-height)/ 2);
 left: calc(50% - var(--smart-window-default-width)/ 2);
 width: var(--smart-window-default-width);
 height: var(--smart-window-default-height);

The following CSS variables: --smart-window-default-width and --smart-window-default-height are used to set the default width and height of the Smart.Window component.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com