Skip to content

Instantly share code, notes, and snippets.

@shauvik
Created April 11, 2017 16:47
Show Gist options
  • Save shauvik/157e637b114e897218a5c9dfaa72c52c to your computer and use it in GitHub Desktop.
Save shauvik/157e637b114e897218a5c9dfaa72c52c to your computer and use it in GitHub Desktop.
multiple htmls in one iframe
<html>
<head>
<style>
#main {
width: 100%;
height: 100%;
border: 1px solid black;
display: -webkit-flex; /* Safari */
display: flex;
}
.one {
-webkit-flex: 1; /* Safari 6.1+ */
-ms-flex: 1; /* IE 10 */
flex: 1;
padding: 5px;
background-color: #efefef;
}
.two {
-webkit-flex: 9; /* Safari 6.1+ */
-ms-flex: 9; /* IE 10 */
flex: 9;
}
</style>
</head>
<body>
<div id="main">
<div id="sidebar" class="one">
<ul>
<li><a href="paper.html" target="iframe1">abstract</a></li>
<li><a href="node1.html" target="iframe1">1</a></li>
<li><a href="node2.html" target="iframe1">2</a></li>
<li><a href="node3.html" target="iframe1">3</a></li>
<li><a href="node4.html" target="iframe1">4</a></li>
<li><a href="node5.html" target="iframe1">5</a></li>
<li><a href="node6.html" target="iframe1">6</a></li>
<li><a href="node7.html" target="iframe1">7</a></li>
<li><a href="node8.html" target="iframe1">8</a></li>
<li><a href="node9.html" target="iframe1">9</a></li>
<li><a href="node10.html" target="iframe1">10</a></li>
<li><a href="node11.html" target="iframe1">11</a></li>
</ul>
</div>
<iframe id="iframe" class="two" name="iframe1" frameborder="0" src="paper.html"></iframe>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment