DEV Community

Faisal Ahmed
Faisal Ahmed

Posted on

Positionaly vertically & horizontally center

<!DOCTYPE html>
<html>
<body>

<div class="invoice-print-container" style="width: 100vw; height: 100vh; position: relative;">
  <div class="water-mark" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.1;">
    <img width="300px" height="300px"; src="https://png.pngtree.com/png-vector/20190115/ourmid/pngtree-green-leaf-hand-painted-300-pixel-map-leaf-love-png-image_348692.jpg" alt="">
  </div>
</div>


</body>
</html>

Enter fullscreen mode Exit fullscreen mode

Top comments (0)