anytime I try to change the min-height or get rid of it all together and add max-height it deletes the image all together. I'd like to resize the image based on the screen but instead it's cropping the image, which I don't want.
.container {
position: relative;
text-align: center;
color: white;
min-height: 600px;
max-height: 1220px;
background-image: url("https://www.culturedkam.com/wp-content/uploads/2022/04/20210924_183939-scaled.jpg");
background-position: center;
background-attachment: local;
}
/* Centered text */
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 8vw;
font-family: bn;
}
@media only screen and (max-width: 800px) {
.centered {
top: 45%;
font-size: 12vw;
}
}
/* Centered text */
.lower-centered {
position: absolute;
top: 65%;
left: 50%;
transform: translate(-50%, -50%);
font-family: smf;
font-size: 8vw;
line-height: normal;
}
@media only screen and (max-width: 600px) {
.lower-centered {
top: 60%;
font-size: 12vw;
}
}
.img {
size: cover;
}
<div class="container"><span role="img" aria-label="bridge"></span>
<div class="centered">Connecting</div>
<div class="lower-centered">Travel and Wellness</div>
</div>