CSS - centralize position:fixed element with CSS calc() function

0 votes
240 views
added Jun 18, 2020 in CSS by lcjr First Warrant Officer (11,530 points)
edited Dec 18, 2020 by lcjr
.centralize {
  width: 984px;
  position: fixed;
  right: calc((100% - 984px) / 2);
  top: 20%;
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...