Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make table column remain on the bottom

Status
Not open for further replies.

Bravogolf

Programmer
Joined
Nov 29, 2002
Messages
204
Location
GB
Hi guys (and gals).
I have a table column on the bottom of every webpage that has a link to the script and CSS files.
Howver, the table column will only stay at the bottom of the page provided that there is enough content to push it downwards.
I.e. If I have only half a page content, the table column will remain halfway up the page and not at the very bottom.

Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="0">
			<tr>
				<td class="navbottom" align="center">&nbsp;View:&nbsp;<a href="code/changeimage.js" class="source">
				Javascript</a>&nbsp;<a href="css/main.css" class="source">CSS</a>
				</td>
			</tr>
</table>

Is there a way of creating a DIV instead, that will always remain at the bottom regardless of page size?
 
Try something like this.

<html>
<head>
<title>Untitled</title>
<style type = "text/css">

}
body span {
position: relative;
margin: 0;
padding: 0;
background-position: 100% 100%;
}
#content {
height:600px;
}
</style>
</head>

<body>
<div id="content">
This is some text at the top
<p>content content content</p>
<p>content content content</p>
<p>content content content</p>
<p>content content content</p>
<p>content content content</p>
<p>content content content/p>
<p>content content content</p>
<p>content content content</p>
<p>content content content</p>
</div>
<span><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="0">
<tr>
<td class="navbottom" align="center">&nbsp;View:&nbsp;<a href="code/changeimage.js" class="source">
Javascript</a>&nbsp;<a href="css/main.css" class="source">CSS</a>
</td>
</tr>
</table></span>
</body>
</html>

Paul
 
Cheers Paul, but that doesnt seem to keep it to the bottom of the page...?
 
I guess the only way to do it is to enclose it in another table. That is the only way I know to expand pages along the whole height.
Code:
<html>
  <head>
    <title>Bottom aligned</title>
  </head>
    
  <body>
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td valign="top">Here be content</td>
      </tr>
      <tr>
        <td height="30">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="0">
            <tr>
              <td class="navbottom" align="center">&nbsp;View:&nbsp;<a href="code/changeimage.js" class="source">
                Javascript</a>&nbsp;<a href="css/main.css" class="source">CSS</a>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </body>
</html>
 
Is it pushing it too low? With a half page of content, it should keep it at the bottom. With a full page (content that extends the bottom of the page) it may push it too low.

Paul
 
Yet another example ....

Code:
<HTML>
<HEAD>
  <TITLE>Page Footer</TITLE>
</HEAD>
<BODY LEFTMARGIN="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0">
  <TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" WIDTH="100%" HEIGHT="100%">
    <TR>
      <TD VALIGN="TOP">
        Your Contents goes here
      </TD>
    </TR>
    <TR HEIGHT="25">
      <TD>
        My Footer, &copy; etc.
      </TD>
    </TR>
  </TABLE>
</BODY>
</HTML>

Hope you find it useful §:O)

Cheers


Jakob
 
Cheers guys,
I got it sorted due to all your help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top