Skip to content

Instantly share code, notes, and snippets.

@nguaman
Forked from zulhfreelancer/index.html
Created March 28, 2019 15:52
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 nguaman/144b07d2db2d83c8c2ec1e902ee8b753 to your computer and use it in GitHub Desktop.
Save nguaman/144b07d2db2d83c8c2ec1e902ee8b753 to your computer and use it in GitHub Desktop.
How to load external website page using iFrame with a fixed top bar? // Demo: http://embed.plnkr.co/iQQPh92IMjCUoeKK6dac/ // Reference: https://perishablepress.com/embed-external-content-via-iframe-and-div/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="position:absolute; left:77; top:77; width:377; height:377; clip:rect(0,381,381,0); background:#FFF;">
<div class="fixed">FIXED NAVIGATION BAR</div>
<iframe id="x" src="PUT_THE_WEBPAGE_URL_HERE" width="600" height="800" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes">
</iframe>
</div>
</body>
</html>
html {
background:black;
}
.fixed {
position:fixed;
height:30px;
background:#fff;
}
#x {
margin-top:30px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment