I am facing a challenge with a parent div that has a specified size. Inside this parent div, there are other child divs, and if any of those child divs start displaying their content outside of the parent div, I want to completely remove that div. I do not want to simply hide it with overflow, I want it gone. I have searched for a solution to this issue but have not found one yet. How can I effectively handle this problem?
To better illustrate the issue, I have created a demonstration on JSFiddle.
Here is the code snippet:
<div style="width: 300px; height: 55px; background-color: gray">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
<div style="border: 2px solid red">
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <strong>I WANT DO DELETE THIS DIV!</strong>
</div>
</div>
I am uncertain if this can be achieved with Blazor, but I am eager to learn and explore the possibilities.
Thank you for your attention.