I have a form on the top of a page with a height of 20-30px and a width of 100%. Below there's an iframe with a height of 100% and a width of 100%. But this brings a scroll, because the height of the page is out of the bounds.
How do I make both fit 100% without having a scroll?
P.S I know chang开发者_如何学运维ing the height to 83% of the iframe will make it work, but only for chrome, for IE it is different story...
Try setting the <iframe>
to have position:absolute
in position to the form:
form{
width:100%;height:30px;
}
iframe{
width:100%;position:absolute;top:30px;bottom:0px;
}
精彩评论