Responsive iframe with fixed div beneath it - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive iframe with fixed div beneath it

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--from   w  ww  .  j  a  va2 s  . c o m-->
   background-color:Chartreuse;
   color:yellow;
   margin:0;
}

#iframe-container {
   height:calc(100vh - 21px);
   width:100%;
}

#iframe-container iframe {
   width:100%;
   height:100%;
   border:0px;
}

#bottom-bar {
   width:100%;
   height:21px;
   background-color:blue;
}

#more-stuff {
   width:100%;
   height:401px;
   background-color:pink;
}
</style> 
 </head> 
 <body> 
  <div id="iframe-container"> 
   <iframe src="https://www.youtube.com/embed/OYbXaqQ3uuo?autoplay=1&amp;cc_load_policy=0&amp;controls=0&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0"></iframe> 
  </div> 
  <div id="bottom-bar">
    Lorem ipsum d 
  </div> 
  <div id="more-stuff"></div>  
 </body>
</html>

Related Tutorials