I am trying to stretch the size of an iframe
to fill the remaining space within my web app. I know the maximum space is being allocated for the div
(by adding a border), but the iframe
height itself is not expanding to fill the entire vertical height.
The problem is the row content
iframe
is not filling the entire vertical space, even though the flexbox is allocating that space appropriately.
Any ideas?
.box {
display: flex;
flex-flow: column;
height: 100vh;
}
.box .row.header {
flex: 0 1 auto;
}
.box .row.content {
flex: 1 1 auto;
}
.box .row.footer {
flex: 0 1 40px;
}
.row.content iframe {
width: 100%;
border: 0;
}
<div class="box">
<div class="row header">
<h1>Event Details</h1>
<div id="container">
<h5>Test</h5>
</div>
<div data-role="navbar">
<ul>
<li><a href="players.html" class="ui-btn-active ui-state-persist">Players</a>
</li>
<li><a href="games.html">Games</a>
</li>
<li><a href="chat.html">Chat</a>
</li>
</ul>
</div>
</div>
<div class="row content">
<iframe src="players.html"></iframe>
</div>
<div class="row footer">
<p><b>footer</b> (fixed height)</p>
</div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…