I have the following style:
.center-box {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
}
And the following HTML:
<div class="center-box" style="background-color: lightgoldenrodyellow;">
<div class="d-flex" style="background-color: lightcyan;">
<i class="far fa-info-circle fa-3x"></i>
</div>
<div class="d-flex pt-2" style="background-color: lightgreen;">
<div class="h4">Caption comes here</div>
</div>
<div class="d-flex pt-2" style="max-width: 25%; background-color: lightcoral;">
<div class="row">
<div class="col-12">
Some long description text comes here. It can be multiple lines and should provide enough information to the user.
</div>
<div class="col-12">
<div class="float-left pt-4">
Options:
<ul>
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
</ul>
</div>
</div>
</div>
</div>
</div>
And the result is on desktop is this:
However, on mobile it looks like this:
Is there a cleaner way to make the width responsive? Do I need to use media breakpoints?


max-width: 25%;is, at most, 25% wide on every screen. Perhaps you wanted a more absolute maximum width? Likemax-width: 400px;? Anyway, yes, most responsive websites use media breakpoints, and Bootstrap can help you a bit to learn about this. Just follow the examples in the documentation. It will take time to understand it all.