By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

how to create table height 100% ?

P: n/a
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how
to do it with stylesheet. i really have problems to create my page. i want to have header on top and footer on bottom. content
should be on top of the middle part. i always got scrollbars, even if my page isn't too large. perhaps, someone can show me to do it
right. the following code describes my wish.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style>
td { font-family: verdana; font-size: 8pt }
html, body { height: 100%; margin: 0 ; width: 100%; background-color: #C0C0C0 }
#wrapperA { height: 100%; margin: 0 ; width: 100%; background-color: #FFC0C0 }
#wrapperB { height: 100%; margin: 0 ; width: 100%; background-color: #C0FFC0 }
#wrapperC { height: 100%; margin: 0 ; width: 100%; background-color: #C0C0FF }
</style>
</head>
<body>
<table id="wrapperA">
<tr>
<td>
<table id="wrapperB">
<tr>
<td>header</td>
</tr>
<tr>
<td><img alt="" height="1" src="/images/dot.gif" width="100%" vspace="5"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td height="100%"<!-- doesn't work, creates scrollbar, must be css, but how -->
<table id="wrapperC">
<tr>
<td>&nbsp;</td>
<td>menu</td>
<td>&nbsp;</td>
<td>body</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><img alt="" height="1" src="/images/dot.gif" width="100%" vspace="5"></td>
</tr>
<tr>
<td>footer</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Sep 29 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.