I'm trying to create a lightbox where the current image takes up 90% of the height of the page OR a 900px width, whichever one happens first.
Naturally, I used the code below, expecting it to fail. I was right. I tried using the aspect-ratio property (which is frowned on because of its lack of browser support), but nothing worked.
Anybody know how to achieve this?
/* Basically the lightbox container */
.modal {
  position: fixed;
  width: 100%;
  height: 100%;
}
/* Each image has the class mySlides */
.mySlides {
  max-width: 900px;
  max-height: 90%;
  margin: 15px 5%;
}
 
    