Skip to content

Instantly share code, notes, and snippets.

@martinvirtel
Last active June 27, 2016 15:57
Show Gist options
  • Save martinvirtel/05f1788dc6f87a9d63b23514d15c1017 to your computer and use it in GitHub Desktop.
Save martinvirtel/05f1788dc6f87a9d63b23514d15c1017 to your computer and use it in GitHub Desktop.
iframe height
<html>
<head>
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
</head>
<body>
<div id="outer" style="height:100px; border: 1px solid red; overflow: auto;">
<div id="inner" style="height:10000px;">
scroll me tender again!
</div>
</div>
<script>
$("#outer").css({ "height" : $("body").height()+"px"});
</script>
</body>
</html>
<html>
<body style="color:#e0e0e0">
<iframe scrolling="no" height="400" frameborder="0" src="iframe.html"></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment