I have a text composed by "< p >" and "< ul >< li >", inside a box.
There's no problem with the lists, but the words in the paragraphs are splitting in half when they reach the padding of the box.
<style>
@media (min-width: 768px)
<style>
.col-md-12 {
flex: 0 0 100%;
max-width: 100%;
}
.alert {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-warning {
color: #856404;
background-color: #fff3cd;
border-color: #ffeeba;
}
.garrigues_RemindersAML__Exvyp {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
color: #0c5460;
border-color: #ffeeba;
text-align: justify;
}
</style>
<div class="row" style="margin-top: 15px;">
<div class="alert alert-warning garrigues_RemindersAML__Exvyp col-md-12">
<p style="font-size: 17px;margin-left:0px;">Reminder </p>
<p> A priori, it is not necessary to request any document from this type of clients. The following documents must be obtained from public sources of information, and included in the AML questionnaire:</p>
<ul>
<li>Documentation proving that it is one of the clients considered low risk.</li>
<li>Documentation accrediting the activity (for example, annual accounts or screenshot of the website).</li>
</ul>
<p> If the customer is a subsidiary or branch of a financial entity or of listed companies whose securities are admitted to trading in a market regulated in the EU or Equivalent Third Countries, it must be justified that they belong (directly or indirectly in more than 50% to the financial or listed entity).</p>
<p> This client has LOW RISK and, therefore, applies SIMPLIFIED MEASURES OF DILIGENCE DUE.</p>
</div>
</div>
I've tried everything to prevent them to break, but there's just 2 results: they break, or the paragraph overflows outside the box.
I've tried all the options with white-space, word-break, overflow-wrap, overflow, display, width, margin, height... And the result is always the same: they break or they overflow.
Is there a way to prevent them from breaking, placing them in the next line, instead of overflowing them?
Thank you in advance.
Edit: each paragraph comes from a database, and then is renderized by a component in a React web application, the code is not as simple as it seems.