.marker { display: block; cursor: pointer; padding: 0; } .marker-img { border-color: #3fb1ce; border-style: solid; border-radius: 50%; /* Circle */ width: 4em; transition-duration: 0.3s; } .marker:hover { z-index: 100; } .marker-img-hoverable { object-fit: cover; width: 4em; height: 4em; } .marker-img-hoverable:hover { transform: scale(1.75); border-color:aqua; } .marker-img-open { z-index: 200; display: block; /* Retain aspect-ratio */ width: auto; /* Max height and width is set with JS style sheet :/ see */ height: auto; border-radius: unset !important; border-color:aqua; }