I am currently working on a component that will be utilized in numerous widgets within our web application. Is there any method to adjust the visibility of elements based on the size of a div?
<div class="container" style="width:100%">
<div>content to show when width is less than 400px</div>
<div>content to display when width exceeds 400px</div>
<div>another division</div>
</div>
Is it achievable using CSS, for instance? I have come across media queries, but it seems that the visibility of elements is solely determined by the size of the widget where it is incorporated and nothing else.