html { background: #191919; } #lightgallery img { height: 300px; margin: 4px; } #lightgallery a { position: relative; display: inline-block; text-decoration: none; margin: 0; padding: 0; cursor: pointer; } .play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; background-image: url('/images/play.png'); background-size: contain; background-repeat: no-repeat; opacity: 0.5; } #lightgallery a:has(.play-icon):hover .play-icon { opacity: 1; }