I have an iframe with a height of 100% along with a div that sits above (height is 70px). The iframe overflows the page, but I want to be able to have the 100% height minus 70px so as that the scrollbar for the iframe fits into the page.
Okay, so I figured it out. I just added a parent div around the iframe.
<div class="parent">
<iframe src="http://reddit.com"> </iframe>
</div>
.parent{
margin-top: 70px;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
}
iframe{
position:absolute;
width: 100%;
height: 100%;
border: 0px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With