Currently, I am utilizing a bootstrap
card and attempting to enhance the appearance of the lengthy text within the dscrptn_limit
class by adding ellipsis at the end.
This is my template
:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<div class="card m-4" style="width: 20rem;">
<div class="card-body">
<h5 class="card-title">My title</h5>
<small class="card-text">topic</small>
<br>
<small class="card-text dscrptn_limit">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ornare sodales ipsum porta rhoncus. Aliquam aliquam...
</small>
</div>
</div>
<style>
.dscrptn_limit{
overflow: hidden;
white-space: normal;
word-wrap: break-word;
height: 180px;
text-overflow: ellipsis;
}
</style>
Regrettably, it seems not to be functioning as intended. Is there a solution for this issue?