foo
foo

Reputation: 275

Bootstrap row with height which depends on first col

I need to make wrapper for youtube video, that contains 2 cols:

enter image description here

So, height of list block depends on height of video (which is responsive). How can I perform this? Thanks.

Upvotes: 0

Views: 155

Answers (1)

bprasanna
bprasanna

Reputation: 2453

I couldn't think of an easy way to resize the list. Whenever a video is loaded you need to get the height of video using javascript and set the max-height value for the list.

Assuming your list id is "vidList", you can modify the max-height like the following inside javascript:

document.getElementById("vidList").style.maxHeight = vidHeight;

Following is the codepen i tried using fixed size iframe and ul. Following is the preview.

Upvotes: 1

Related Questions