Reputation: 275
I need to make wrapper for youtube video, that contains 2 cols:
So, height of list block depends on height of video (which is responsive). How can I perform this? Thanks.
Upvotes: 0
Views: 155
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