Solved

Table height

Posted on 2004-09-03
2
351 Views
Last Modified: 2010-04-09
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
Comment
Question by:Flavaflav
2 Comments
 
LVL 19

Accepted Solution

by:
dakyd earned 50 total points
ID: 11975029
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
 
LVL 2

Expert Comment

by:cheyennejk
ID: 11975407
Trimming your margins may help:

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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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)

746 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