To create a table that fills 100% of the screen height, copy and paste the code below and create a new .html file named table.html.
You can set the width of the table in pixels to whatever you like, by changing the width value in the CSS part of the code below.
You can also change the background color and the padding values.
<html>
<head>
<title>Table 100% screen height using CSS and HTML</title>
</head>
<style>
html, body, #wrapper {
height:100%;
margin: 0;
padding: 0;
border: none;
text-align: center;
}
#wrapper {
margin: 0 auto;
text-align: left;
vertical-align: middle;
width: 800px;
background-color:#CCCCCC;
}
</style>
<body>
<table id="wrapper">
<tr>
<td align="center"><img src="http://www.techheadz.co.uk/techeadz_logo.gif"><br><br><h1>Table 100% of screen height using CSS.</h1>
<h2><a href="http://www.techheadz.co.uk/228.html">Click here</a> to return to tutorial<br>
<a href="http://www.techheadz.co.uk">Click here</a> to return to techheadz homepage</h2></td>
</tr>
</table>
</body>
</html>