title: How can I overlay multiple images using HTML/CSS or JavaScript, without using position:absolute?
body: <p>I am a Google lover, and as thus I've hunted around pretty thoroughly before arriving here. Perhaps I'm just being inattentive, or my skimming habit is coming back to bite me, but I don't believe I've found the answer yet.</p>
  
  <p>I've seen solutions to similar problems, but I don't think any of them are applicable here. <em>I want to overlay two PNGs of the same size in an element</em>; this in itself is simple, but the context is a little more complex. I've worked with HTML/CSS for a long time now, and I'm learning JavaScript currently; as such, I've been making an HTML game. This game involves creating animals with different characteristics, and I've drawn PNGs for each of the characteristics and saved them separately with transparent backgrounds. Here, for reference, is an example:</p>
  
  <p>The base image:</p>
  
  <p><img src="https://i.imgur.com/A2bAhYw.png" alt="Frog base image"></p>
  
  <p>Eyelashes I want to overlay for female frogs:</p>
  
  <p><img src="https://i.imgur.com/af54sl3.png" alt="Female eye sprite"></p>
  
  <p>I am familiar with using position:absolute to overlay images, but I can't give an absolute position; the creatures will be displayed automatically to a div alongside each other using innerHTML, which presents two problems: one, not every creature will be in the same absolute position, and two, some will not be visible until the user scrolls down. I've also thought about setting the background image as one image, but there will be scenarios which require the overlay of up to four individual images, so that wouldn't work. I've come across some mysterious possibilities regarding jQuery, but since I haven't gotten that far in my learning yet, I'd appreciate very much if someone is able to help me. The only other alternative is to manually overlay and save every possible combination as an image, which would require several hundred images, so I fervently hope I can avoid that path at all costs.</p>
  
  <p>If I'm just being stupid and the solution is already in one of the possibilities I've considered and discarded, please let me know.</p>