Thursday, September 18, 2008

XHTML table or div height in percentage (%)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Height 100%</title>
<style type="text/css">
html {
height:100%;
}
body {
height:100%;
margin:0;
padding:0;
}
</style>
</head>
<body>
<table style="height:100%; width:100%" border="1">
<tr><td>Top</td></tr>
<tr><td>Middle</td></tr>
<tr>
<td valign="bottom">
<table style="height:80px; width:100%" border="1">
<tr><td>bottom</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>

http://apptools.com/examples/tableheight.php
http://www.webmasterworld.com/forum83/200.htm

No comments:

Post a Comment