I want to apply a border to the highest div inside a Bootstrap row. Below is my code (as an example):
<section>
<div class="row">
<div class="col-md-6">
<strong><span style="color:#f77f00;">TIP 1:</span> blahblahblah</strong>
<p>dnijengeinjkdngkjdfnsdmnvjkgnkjnvjkerngeiuj <br/>orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="col-md-6">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/4ZT2AXgGzAU?start=77" frameborder="0" allowfullscreen class="embed-reponsive-item"></iframe>
</div>
</div>
</div>
</section>
In some cases, the Youtube video DIV (class="col-md-6") is the highest, while in other cases the text div (class="col-md-6") is the highest. (When you are viewing it on tablet for instance)
What is the best solution to determine the highest div, find out on which side it is (left/right) and apply a border to left or right (depending on which side it is)?
Here is an example of what I mean.
As you can see, the middle line is not all the way to the bottom. I want it to go all the way to the bottom and I have found a solution to this:
section {
padding: 30px;
border: 1px solid gray;
margin-bottom: 45px;
}
section .row {
border: 1px solid gray;
}
section .row > div:last-of-type {
border-left: 1px solid gray;
}
section .row > div:only-child {
border-left: 0;
}
@media (max-width: 991px) {
section .row > div:last-of-type {
border-left: 0;
}
}
But this only works, if the div to the right is higher than the left div (as you can see in the example)
If my question is not clear or incomplete, please let me know.
EDIT: Why is my post downvoted? I do not understand why.