Positionally Center, when use position like fixed, center the container

Faisal Ahmed - Nov 2 - - Dev Community
.product-scroll-area {
  display: block;
  position: fixed;
  bottom: 20px;
  width: 70%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s linear;
  z-index: 300;

  /* Changes to center horizontally */
  left: 50%;
  transform: translateX(-50%);
}

Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .