Skip to content

Instantly share code, notes, and snippets.

@twhid
Created April 2, 2012 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twhid/2283746 to your computer and use it in GitHub Desktop.
Save twhid/2283746 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Skeleton Parent Page</title>
<style type="text/css">
html {
width: 100%;
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<iframe id="ad-iframe" src="/url-to-ad-tag-page/" style="overflow: hidden; border: 0 none;"></iframe>
<script type="text/javascript">
// a mock of code to resize iframe on the orientationchange event
(function() {
var resize;
(resize = function () {
var f = document.getElementById('ad-iframe'),
el = document.documentElement;
f.style.width = el.clientWidth + 'px';
f.style.height = el.clientHeight + 'px';
})();
window.addEventListener("orientationchange", resize, true);
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment