Hi
I am currently completing Tea Cosy project and stumbled on problem with background img of my div. The img will not resize when reducing screen .
I have set width and height of the div as that is the only way img will appear.
When i attempt to change width and height to max values or more dynamic measures the img disappears completely .
Please some advice on where I’m going wrong and how to create div with responsive background img.
<div class="mission">
<div class="mission-statement">
<h2> Our Mission</h2>
<h4>Handpickt, Artisanally Curated, Free Range, Sustainable, Small Batch, Fair Trade, Organic Tea</h4>
</div>
</div>
CSS
.mission {
display: flex;
flex-wrap: wrap;
align-items: center;
max-width: 1200px;
height: 700px;
background-image: url(img-mission-background.jpg);
}
mission-statement{
display: flex;
flex-direction: column;
flex-shrink: 1;
background-color: black;
max-height: fit-content;
width:100%;
text-align: center;
}