1
I want my table to be the same size as the div that contains my iframe. Is that possible? If so, what am I doing wrong?
Obs: I am posting the parts of my code that affect the div that contains iframe and my javascript implementation to set 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>
<table id="tableEsport">
<tbody>
</tbody>
</table>
It would be good to put the table html
– Costamilam
I had not put it because it was extremely simple, but ta ae
– Vinícius França