I am trying to achieve auto resizing of the 2nd iframe in this code,
Any help would be appreciated.
CSS
* {
margin: 0;
padding: 0
}
html, body {
height: 100%;
width: 100%;
overflow: hidden
}
table {
width: 100%;
table-layout: static;
border-collapse: collapse
}
iframe {
width: 100%
}
.header {
border-bottom: 1px solid #000
}
.content {
height: 100%
}
HTML
<table>
<tr>
<td class="header"><div><h1>Header</h1></div></td>
</tr>
<tr>
<td class="content"><iframe name="iFrame1" height="85" src="Materials AU Stocked Header.htm" scrolling="no" frameborder="1"></td>
</tr>
<tr>
<td class="content"><iframe name="iFrame2" height="100%" src="Materials AU Stocked.htm" scrolling="yes" frameborder="1"></td>
</tr>
</table>
You can do this using
position: absolutewith your second iframe and specifyingtop,bottom,leftandright.This requires your
#headerand firstiframehave a fixed height.Note I’ve put in some external websites in the iframe
srcfor testing purposes. Replace these with your desired html pages.HTML
CSS
Demo
A few extra things that I noticed in your code
Materials AU Stocked Header.htmto somethin likeMaterials-AU-Stocked Header.htm<iframe>needs</iframe>after it