I'm wanting my table to be the same size as the div containing my iframe. It is possible? If so, what am I doing wrong?
obs: I am putting in the post the parts of my code that affect the div that contains the iframe and my javascript implementation to be the same size in the table.
var tableheight = document.getElementsByTagName("video-wrapper").offsetHeight;
document.getElementsByTagName("table").style.height = tableWidth;
table {
width: 100%;
display:block;
}
tbody {
display: inline-block;
width: 100%;
overflow-y: auto;
padding: 10px;
background-color: black;
border: 2px solid white;
}
tbody tr{
margin: 2px solid white;
}
.video-wrapper{
position: relative;
padding-bottom: 56.25%; /* 16:9 */
height: 0;
}
.video-wrapper iframe{
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
<div class="content-wrap">
<div class="video-wrapper"><iframe width="100%" height="auto" src="https://www.youtube.com/embed/z9Ul9ccDOqE"allowfullscreen></iframe></div></div><tableid="tableEsport">
<tbody>
</tbody>
</table>