Created
February 8, 2016 18:41
-
-
Save zulhfreelancer/aa4f3be71ddafcba12a6 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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
background:black; | |
} | |
.fixed { | |
position:fixed; | |
height:30px; | |
background:#fff; | |
} | |
#x { | |
margin-top:30px; | |
} |
Try this answer from stackoverflow.
"The reason why external websites such as:
youtube.com
google.com
stackoverflow.com
etc.
are not loading in your frame, is because they are intentionally leveraging some sort of Frame Killer."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is not working for me. I downloaded the file and just changed PUT_THE_WEBPAGE_URL_HERE for my url and is not working. Is not working with any url. Any idea?