I'm using the Bootstrap grid and I have two columns:
<div class="col-md-7 no-padding">
... content 1 ...
</div>
<div class="col-md-5">
... content 2 ...
<div>
I would like to have the first column col-md-7 dynamically: if the near column col-md-5 is empty I would like to have col-md-7 as full width (col-md-12).
How can I do this dynamically?
You can use the selector
:has(). For example, like this (I not using bootstrap, just demonstrating the idea):