Using bootstrap, I have a row and two columns. The first contains an image, the second some text. I'm trying to cut off the text at image height. Is this possible without JavaScript and fixed heights?
Thanks for your help!
.row {
margin: 1rem 0 0 1rem !important;
max-width: 20rem;
}
div>div {
border: 1px solid red;
}
.col-5 {
padding: 0 !important;
}
.col-7 {
overflow-y: hidden;
/* How do I make this column as tall as the previous? */
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-5">
<img src="https://booklers.net/images/userImages/Doidel/bookImages/4/thumb.jpg" class="img-fluid" />
</div>
<div class="col-7">
This is some test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text. This is some more test text.
</div>
</div>