As a beginner developer embarking on my first web page project, I've encountered a challenge. The text I inserted into a flexbox refuses to align beneath the image.
.title {
text-align: center;
width: 500px;
margin-left: auto;
margin-right: auto;
color: white
}
#hero {
background-image: url("river.webp");
background-size: cover;
padding: 10px 0 100px 0
}
body {
margin: 0
}
.three {
color: white;
display: flex;
flex-direction: row;
gap: 10px;
justify-content: space-around;
padding-top: 100px
}
<div id="hero">
<h1 class="title">This is Cypress!</h1>
<div class="three">
<h4>Lively malls</h4>
<h4>Challenging Escape Rooms</h4>
<h4>Relaxing on the lake</h4>
</div>
</div>
Despite trying to adjust margins and padding, the background image keeps scaling with the text. What solutions can I explore to resolve this issue?