If I have to use absolute position to keep the background picture and picture of the vector on the top of the page, but when I resize the window, even though the background picture shrinks, the vector stays in the same position. Is there a way to keep both at the top of the page and the vector to stay at the same relative position to the background image, and for them to grow and shrink together? What they currently look like after shrinking and what I want
CSS:
.landingImage {
z-index: 0;
background-size: fill;
background-size: 100vw 100vh;
top: 0;
padding: 0;
display: grid;
width: 100%vw;
max-height: 944px;
}
.landingText {
position: absolute;
z-index: 0;
background-color: black;
color: white;
text-align: left;
align-items: left;
margin-top: 200px;
margin-left: 100px;
top: 0;
}
.wrapper {
position: absolute;
z-index: 0;
margin-top: 500px;
margin-left: 500px;
top: 0;
}
.vector{
}
HTML:
<Image className={indexStyles.landingImage} src={orcas} />
<div className={indexStyles.wrapper}>
<Image className={indexStyles.vector} src={vector} />
</div>