One column's width relative to resizable 100% height square - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Column Layout

Description

One column's width relative to resizable 100% height square

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">

.profile_page {<!--from ww w.  j  a v  a  2s  . co m-->
   width: 100%;
   height: 100%;
   position: absolute;
}
.left {
   float:left;
   max-width: 20%;
   position: relative;
   min-width: 100px;
}
video {
   top: 0;
   right: 0;
   border: 1px solid red;
   float: right;
   height: 100%;
   position: absolute;
   max-width: 80%;
}


      </style> 
 </head> 
 <body> 
  <div class="profile_page"> 
   <div class="left"> 
    <p>This paragraph's width should adjust according to the videos width.</p> 
   </div> 
   <video src="your mp4"></video> 
  </div>  
 </body>
</html>

Related Tutorials