i am dealing with
HTML and CSS files
<div>
<p class="ellipsis"> Some text that is generated randomly</p>
</div>
The CSS code in the LESS file is as follows:
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
I want to ensure that the width of my paragraph does not exceed the width of its parent div. The parent div width is based on the browser window, meaning it can change constantly. Additionally, the randomly generated text can vary in length from 1 to 1000 characters.