<h2>This is a Page Title</h2>
<div id="iframe-div">
<iframe width="100%" height="100%" src="https://sightmap.com/embed/e8ywkqrqwlx" frameborder="0" id="sightmap"></iframe>
</div>
CSS
/* maximize html and body tags,
so that the iFrame will inherit
as much width height as possible */
html {
width: 100%;
height: 100%;
}
body {
width: 100%;
height: 100%;
background-color: #eff8ff;
margin: 0; /* make this zero so that there's no extra space in this example*/
}
div#iframe-div {
/* Allow some padding so that the window can be scrolled easily */
padding-left: 2em;
padding-right: 2em;
/* Auto width will adjust the width of the encapsulating div to 100% - 2em.
Height is kept at 100% here, but this can be adjusted to other sizes as desired.*/
width: auto;
height: 100%;
}
/* If the screen is narrow enough to be a mobile device, set
the iFrame to a fixed height so that it still looks great. */
@media (max-width:767px) {
iframe {
height:450px;
}
}
/* Center the sample header in the middle of the window. */
h2 {
text-align: center;
}
JavaScript
// No JavaScript required.
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.