When working with HTML and bootstrap (3.7) CSS, I often come across this issue:
<div class="row">
<div class="col-xs-6">Stretch ME!</div>
<div class="col-xs-6">Conditional</div>
</div>
Sometimes the "Conditional" div is present, sometimes it's not. The challenge is how to make the "Stretch ME!" div stretch to the width of the row
even if the other div is not there. Is there a way to achieve this using bootstrap
without having to conditionally rewrite the classes? Perhaps by using a class like
class="col-xs-6 but-flex-me-if-over-blank-space"
.
P.S. Surprisingly, I have searched extensively but have not found a clear answer on this common dilemma.