• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

Table height

How do I make the height of a table span the whole document? I have a menubar aligned to the left, with a height of "100%", but it only fills up the 1st page, and if there's content that spans more than 1 page and I scroll down, from the 2nd page on that content begins directly below my left menu as opposed to to the right of it. How can I fix that?

Here is the table:

<table width="200" height="100%" border="0" align="left">
<tr><td><a href="displayAddUserForm.do">Add User</a></td></tr>
...
<tr><td height="100%">&nbsp;</td></tr>

Btw this menu is in a separate file, if that helps.

Thanks in advance.
0
Flavaflav
Asked:
Flavaflav
1 Solution
 
dakydCommented:
Since you're already using tables, will something like this work?  Depending on the rest of your page, however, it may be simpler/better to move away from a table layout.  Regardless, hope that helps.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD PUBLIC HMTL 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<style type="text/css">
table {
  border-collapse: collapse;
}

table td {
  border: 2px solid #000000;
}

table table td {
  border: 0;
}

#Menu {
 vertical-align: top;
}
</style>
</head>

<body>
<table>
  <tr>
    <td id="Menu">
      <table>
        <tr><td><a href="displayAddUserForm.do">Add User</a></td></tr>
      </table>
    </td>
    <td>
      Content
      <p>As this grows, so will the menu on the left</p>
      <p>You can test this by adding more content here</p>
      <br />
      More Content
      <p>What's more, this content will stay to the right of the menu</p>
      <p>Go ahead and try it</p>
    </td>
  </tr>
</table>
</body>
</html>
0
 
cheyennejkCommented:
Trimming your margins may help:

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
0

Featured Post

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now