www.webdeveloper.com
Results 1 to 3 of 3

Thread: Making automatic full height of small table inside a larger table?

  1. #1
    Join Date
    Sep 2012
    Location
    Denmark
    Posts
    2

    Making automatic full height of small table inside a larger table?

    Hi people

    I've fruitlessly tried googling this question, so now I hope that some of you might be able to see what I need to do

    I am making a small web-page using a combination of CSS and tables (I'm sorry, but it's better than frames, right? ). I have a large table with three columns (only one row) as the main container of the page - with a menu to the left, the main content in the center, and some boxes to the right. You can see a very simple example on http://bozack.dk/div/test.php. You can also just see the code here:

    Code:
    <div align="center">
    <table width="80%">
      <tr>
        <td width="120px" VALIGN="top">
          <table width="100%">
            <tr height="30px" ><td> 11 </td></tr>
            <tr height="100px"><td> 12 </td></tr>
            <tr ><td> 13 </td></tr>
          </table>
        </td>
        <td>
           <p>Lorem ipsum dolor sit amet, ...</p>
           <p>Diam ut tempor, sed etiam ...</p>
           <p>Tempus turpis cubilia vel quisque. ...</p>
           <p>Mauris felis eros elementum, ...</p>
           <p>Ut aenean, fringilla cursus nulla ...</p>
        </td>
        <td width="120px" VALIGN="top">
          <table width="100%">
            <tr height="80px" ><td> 31 </td></tr>
            <tr height="140px"><td> 32 </td></tr>
            <tr><td> 33 </td></tr>
          </table>
        </td>
      </tr>
    </table>
    </div>
    What I want to do is make the lower box in each of the two sides (marked 13 and 33) fill out the rest of the height. Kind of like having a
    HTML Code:
    height="100%"
    attribute to the tables in the left and right sides.

    I've tried with
    Code:
    height:100%;
    in the table, but it doesn't seem to do anything.

    Can anyone help me?

  2. #2
    Join Date
    Oct 2009
    Posts
    41
    Hi,

    You need to set the height of all tables to 100% including the first one.

    ginger

  3. #3
    Join Date
    Sep 2012
    Location
    Denmark
    Posts
    2

    But..

    But the outer table is not supposed to have 100% height - it is supposed to have the height that the content makes it have. As shown on the test page (http://bozack.dk/div/test.php), I simply want the "13" and "33" boxes to fill the rest of the height, as set by the long content in the middle part.

    Isn't it possible to have one inner table fill the full height of the outer table it is in..?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles