Make a table to be 100% height of the window - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Height

Description

Make a table to be 100% height of the window

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--   w ww.  j a  va 2s .  c o  m-->
 <body> 
  <table style="width: 100%; height: 100vh; border: solid 1px black;"> 
   <tbody> 
    <tr> 
     <td style="text-align: center; vertical-align: middle; padding: 5px; position: relative;"> <p style="display: inline-block; width:100%; background: #ccc; vertical-align: middle;">Lorem ipsum </p> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials