To make an iframe the full width and the full height of the viewport, ensure that the html
and body
are set to the full height
and width
of 100%
. After that is done, you can set the height
and width
of the iframe also to 100%
.
html, body{
width: 100%;
height: 100%;
}
iframe{
width: 100%;
height: 100%;
margin: 0;
}
<html>
<body>
<iframe frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid='Dashboard'!A1%3AL18&wdHideGridlines=True&wdInConfigurator=True"></iframe>
</body>
</html>
I have tested this code and it works in mobile, tablet and desktop view.