[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-04-03
5
Medium Priority
?
264 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 600 total points
ID: 10751320
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

831 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