Anyone know of a way to stop a column from exceeding the height of another column in a row?
Example:
The left-col content has a greater height then the right-col content, but I want the right column to be the dominant height. I want left-col height to match right-col and if the content in right-col grows in height, I want left-col height to resize to match the right-col height but never exceed it.
I have a bit of a solution with this bit of javascript:
var rightHeight = document.getElementById(‘right-col’).clientHeight;
document.getElementById(‘left-col’).style.height = rightHeight + ‘px’;
and then css:
#left-col {
height: fit-content;
}
#right-col {
height: fit-content;
}
But it doesn’t recognise if there is a change of height after the loading of the page, say if you are on a tablet device and change from landscape to portfolio without refreshing the page, it won’t update.
Can this be achieved with just css? Bare in mind that I don’t want to be setting a fixed height on the parent Row.
Or if someone with the JS knowledge could advise on how to get the bit of js to work not just on page load.
I wonder if the Bootstrap Studio developers would be able create a solution for this, maybe a switch control to set the selected column as the max height for all columns within its parent row, and have that work with the SM MD LG XL XXL.