get element centered position relative to window javascript code example
Example: how to middle fixed element
position: fixed;
top: 0;
z-index: 100;
left: 50%;
transform: translateX(-50%);
position: fixed;
top: 0;
z-index: 100;
left: 50%;
transform: translateX(-50%);