-1

I have an image background in css and 2 images overlaying that. On my device I can line them up perfectly the way I want, but when I go to view them on another device or change my screen size, the 2 overlaying images change size and position while the background doesn't. I know there's a line of css that I'm missing or doing wrong, so if anyone could help it would be much appreciated. Thanks, and here's my code:

enter image description here

  • Please provide a [minimal, complete, and verifiable example](https://stackoverflow.com/help/mcve). – Olafant Mar 11 '19 at 21:36
  • Next time also add the related HTML; it makes it easier for us to amend it. Use the in your question. – Demian Mar 11 '19 at 22:30

1 Answers1

0

Never mind actually, I just found out that by using percents instead of pixels for the positions and width it automatically adjusts.

  • also use relative positioning, and use percentage for placing it, e.g. margin-left:10%; as well as using percentage for width (and auto for height) – Rachel Gallen Mar 11 '19 at 21:40