Using Height Percentage in HTML Tables VS2008

Bill Humphrey

Active member
Joined
Apr 10, 2008
Messages
35
Programming Experience
Beginner
Hi

I'm using VS2008 and I've been trying to find a way to use height in a table = 100%, but it only seems to work in pxls.

HTML:
<style type="text/css">
            .style1
            {
                width: 100%;
                height: 750px;
            }
</style>
how can I get a <tr> or a table to have 100% height

Regards BH
 
When I run your sample (box) I do get a full page table both in IE and FF. Could there be something else interfering? Still I think I saw something similar to what you describe many years ago in an old browser, there I think I had to set the size of the Body to 100% for the body contents to fill the full page.
HTML:
<style type="text/css">
            .style1
            {
                width: 100%;
                height: 100%;
            }
td {background-color:blue}
</style>
<body>
<table class="style1">
<tr><td>cell</td></tr>
</table>
</body>
 
As I said, something is probably interfering, when I tried this VWD I also got a single line, but when I removed the Doctype instruction at top of page the result was full-page height as expected.
 
Back
Top