Answers for "how to allign position fixed in css"

CSS
9

center position fixed

.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
Posted by: Guest on June-03-2020
0

center position fixed element

.centered {
    position: fixed;
    left: 50%;
    transform: translate(-50%, 0);
}
Posted by: Guest on September-22-2021

Browse Popular Code Answers by Language