I am facing an issue with making two foreground images responsive, despite having a responsive background image. Can anyone help me make these images adjust properly when resizing the window?
While my background image responds well to window resizing, the two images placed on top of it do not. How can I ensure that both the foreground images are also responsive?
CSS code:
.wrapper {
position: relative;
width: fit-content;
height: fit-content;
}
.Icon1 {
position: absolute;
left: 50%;
top: 77%;
transform: translate(-50%, -50%);
width: 130px;
}
.Icon2 {
position: absolute;
left: 50%;
top: 84%;
transform: translate(-50%, -50%);
width: 130px;
}
HTML code:
<div class="col-xs-12 col-sm-6 col-no-padding wrapper">
<img class="img-responsive" src="background1.jpg"
alt="Responsive Image1" width="700" height="auto"/>
<a href="https://www.google.com/"><img src="Images1.png"
class="Icon1" alt="Responsive Image" width="auto" height="auto"/></a>
<a href="https://www.google.com/"><img src="Image2.png"
class="Icon2" alt="Responsive Image" width="\auto" height="auto"/></a>
</div>