• Home
  • Save code
  • Refresh
  • theme1 theme2 dark3
  • Embed
  • DMCA

Show only header of a website in iframe

<html lang="en">
<head>
  <title>Show only header of a website in iframe</title>
</head>
<body>
<style>
 #div-id{
    border : 2px solid black;
    width    : 100%;
    height   : 80px;
    position : relative;
    overflow : hidden;
}
 
 #iframe-id{
    position : absolute;
    top      : -5%;
    left     : 0;
    width    : 100%;
    height   : 200%;
}
@media (min-width:667px){
   #iframe-id{
    top      : -70%;
  }
</style>
<div id="div-id">
 <iframe src="https://search.3schools.in/p/home.html" id="iframe-id" scrolling="no"></iframe>
</div>
</body>
</html>
 
 

You may like these posts :

    Write Your Comment