how to fixed center and right position in css code example
Example 1: center position fixed
.centered {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
Example 2: how to middle fixed element
position: fixed;
top: 0;
z-index: 100;
left: 50%;
transform: translateX(-50%);