Using flexbox has been instrumental in making my webpage responsive and positioning elements, but I've encountered an issue where the text within the containers is overflowing. https://i.sstatic.net/jH9tl.png
I'm striving to keep all text neatly contained within their designated divs, but they persist in spilling out onto the page. What could be causing this problem?
html
<div class='boxes-top'>
<div class='box-1'>
<h4>The Historical Carousel</h4>
<p>Perfect for private parties or an impromptu ride,
this historic icon pairs perfectly with treats from the vintage
soda-fountain located inside.</p>
<p>Phone: (310) 394-8042</p>
</div>
<div class='box-2'>
<h4>Playland Arcade</h4>
<p>For kids and kids at heart, this classic arcade will
indulge all your nostalgia and test all your skills.
Skeeball is only the beginning.</p>
<p>Phone: (310) 451-5133</p>
</div>
<div class='box-3'>
<h4>Santa Monica Pier Aquarium</h4>
<p>The hidden gem of the Pier, Heal the Bay’s public marine-education
center is hands-on fun tucked just underneath the historic Carousel building.</p>
<p>Phone: (310) 393-6149</p>
</div>
</div>
<div class='boxes-bottom'>
<div class='box-1'>
<h4>Marlene's Beach Comber</h4>
<p>This is your one-stop beach shop for sunscreen, towels, beach mats and more.
If the Beachcomber doesn’t have it, it may not exist.</p>
<p>Phone: (310) 260-8744</p>
</div>
<div class='box-2'>
<h4>Pier Bait and Tackle</h4>
<p>Yes, you can fish at the Pier! And whether you’re a regular or want to try your
hand at this relaxing past-time for the day, the Bait & Tackle shop has your needs covered.</p>
<p>Phone: (310) 576-2014</p>
</div>
<div class='box-3'>
<h4>Live music & dancing at Rusty's</h4>
<p>When the sun dips on your day at the beach, stay for some all-American live rock and drink
specials at Rusty's.</p>
<p>Phone: (310) 393-7437</p>
</div>
</div>
css
.boxes-top{
display: flex;
}
.boxes-top div{
padding: 10px;
}
.boxes-bottom{
display: flex;
}
.boxes-bottom div{
padding: 10px;
}
.box-1 {
flex: 1;
height: 150px;
background-color: yellow;
}
.box-2 {
flex: 1;
height: 150px;
background-color: teal;
}
.box-3 {
flex: 1;
height: 150px;
background-color: grey;
}