Solved

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

Posted on 2004-04-03
5
255 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
ID: 10751320
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 100 total points
ID: 10752075
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
ID: 10761385
I assume you mean fill the page vertically? Have you tried height="100%" for the table?
0
 

Author Comment

by:JDmears3
ID: 10762881
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
ID: 10765654
Glad we could help.  Thanks for the A. :^)

Cd&
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
removing hyperlinks from end-notes in a PDF to HTML conversion 8 79
Problem to echo 6 81
Cordova Camera plugin fails 2 97
Randomize in Owl Carousel v1.3.2 6 20
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 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

12 Experts available now in Live!

Get 1:1 Help Now