Solved

How can I make a table row fill a page regardless of its contents?

Posted on 2004-04-03
5
254 Views
Last Modified: 2010-04-06
Look at this site:  http://profjurtz.no-ip.com

I'd like to make the three table columns fill the entire page.  Right now the row that they are contained in, only grows proporionately to the amount of data contained therein.  Ideally, I'd like those columns to fill the entire page even if none of the columns contain a full page of text.
0
Comment
Question by:JDmears3
5 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 150 total points
Comment Utility
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 100 total points
Comment Utility
If you are using a table for layout, you would be better to convert to CSS, but if the table is for data presentation or converting to CSS is not possible at thei time, then you need a scripted solution.  With this whenever the table is less than the height of the screen it will extend downward.  When the table height exceeds the screen height, it is unaffected.

Tested for IE6 and Mozilla 1.6

Cd&


<html><head><title>none</title>
<script type="text/javascript">
<!--
   function setH()
   {
      if (document.documentElement && document.documentElement.clientHeight)
         H=document.documentElement.clientHeight;
      else
         H=document.body.clientHeight;
         obj=document.getElementById('thetable')
      tabH=Math.max(obj.offsetHeight,H-obj.offsetTop);
      obj.style.height=tabH+'px';
   }
onload=setH;
//-->
</script>
</head>
<body>
<table id="thetable" border="1">
<tr>
    <td align=center class="data"> DATA </td>
    <td align=center class="data"> DATA </td>
    <td align=center class="data"> DATA </td>
</tr>
</table>
</body>
</html>
0
 

Expert Comment

by:strolfey
Comment Utility
I assume you mean fill the page vertically? Have you tried height="100%" for the table?
0
 

Author Comment

by:JDmears3
Comment Utility
I got both solutions to work in test files.  I'm going to go with the solution posted by dorward, but COBOLdinosaur's solution worked w/o having to modify my current design.

Thanks a lot guys!
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Glad we could help.  Thanks for the A. :^)

Cd&
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now