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:
Asked
Active
Viewed 626 times
-1
1 Answers
0
Never mind actually, I just found out that by using percents instead of pixels for the positions and width it automatically adjusts.

matthew gage
- 36
- 4
-
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
in your question.
– Demian Mar 11 '19 at 22:30