Aligning a table at bottom of screen

liunx

Guest
Is there a way to make it so that a table is always aligned at the bottom of the screen, no matter how much text is on the screen? I'd like to have my copyright info and links always appear at the bottom of the browser window.<!--content-->Use a frame that contains that information. Divide the page into two frames, one that is displaying the content an another that is always at the bottom of the page displaying the data that you want to be the same for all pages. For example<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<br />
<html><br />
<head><br />
<title>Untitled</title><br />
<!-- frames --><br />
<frameset rows="50%,*"><br />
<frame name="top_frame" src=http://www.htmlforums.com/archive/index.php/"whatever.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0"><br />
<frame name="bottom_frame" src=http://www.htmlforums.com/archive/index.php/"copyrights.html" marginwidth="10" marginheight="10" scrolling="no" frameborder="0"><br />
</frameset><br />
</head><br />
<body><br />
</body><br />
</html><!--content-->you might try your table properties at 100% height, and define each of the cell properties heights... top cell to lets say 150 pixels, center cell WITHOUT defined properties (so it will expand to the max) and bottom cell to 150 pixels.<br />
<br />
hope it helps!<br />
chris<pixelmonkey>:monkey:<!--content-->Why don't you show us your page or at least the code so that we can help you out a little better.<!--content-->How about using CSS positional elements?<br />
For example, in your css style sheet create a class called box:<br />
<br />
.box {/*this is a box where the bottom-navigation and the copyright will be placed*/<br />
background: #FFFFFF; <br />
color : #000099;<br />
font-family : Arial, Tahoma, Verdana, Helvetica, sans-serif;<br />
font-size: 12px;<br />
padding : 2px;<br />
margin-bottom: -2px;<br />
border: 2px groove #48D1CC;<br />
}<br />
<br />
<br />
Although I haven't tried this myself, my understanding is that this should place a box with its bottom margin 2 pixels from the bottom of the page.<br />
<br />
Just a thought.<!--content-->This one:<br />
<br />
<STYLE TYPE="text/css"><br />
<!--<br />
.box {/*this is a box where the bottom-navigation and the copyright will be placed*/ <br />
background: #FFFFFF; <br />
color : #000099; <br />
font-family : Arial, Tahoma, Verdana, Helvetica, sans-serif; <br />
font-size: 12px; <br />
padding : 10px; <br />
position:absolute;<br />
left:125px;<br />
bottom:6px;<br />
border: 2px groove #48D1CC; <br />
}<br />
--><br />
</STYLE><br />
<br />
</HEAD><br />
<body bgcolor="#ffffff" text="#b41b32" link="#0000ff" vlink="#800080" alink="#ff0000" Marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 BACKGROUND="#" ><br />
<div class="box">&nbsp; ||&nbsp; ?shippyatdrexel &nbsp;||&nbsp;</div><br />
=================<br />
Just the code of torrent with this in it:<br />
position:absolute;<!--content-->Thanks Peter. :)<!--content-->make the table height 100% then make the this code for the table data you want at the bottom<br />
<br />
<br />
<br />
<td valign="bottom"> table data </td><!--content-->That code won't make the table the way he wants it to appear. He needs a script that will put his copyright info at the bottom of the page no matter what the screen resolution is. Your code will make the table, which contains this information, exactly the same height of the browser. If he has any other information above that table, it will push that table down and the user will be required to scroll down to see the copyright information in that table.<!--content-->I believe from other web design forums that using relative height sizes in the table tag is considered to be poor implementation and is being deprecated. <br />
<br />
Can anyone confirm whether this is actually the case or not?<!--content-->The height property for tables is not depreciated. It is non-standard.<br />
It is not part of the standards even though major browsers have put<br />
it in anyway. Percentages work most of the time in IE (sort of) but<br />
not in Netscrap or Opera.<br />
<br />
I think what you need will go something like this:<br />
<br />
The stuff you want at the bottom has to be in a layer (absolutely<br />
positioned div for compatibility) like this:<br />
<div id="thediv" style="position:absolute;top:0;left:0;visibility:hidden"><br />
<br />
The do the body tag this way:<br />
<br />
<body onLoad="positionit()"><br />
<br />
This goes in the head:<br />
<br />
<script language="JavaScript"><br />
<!--<br />
var obj;<br />
var H;<br />
var divH;<br />
var T;<br />
<br />
function positionit()<br />
{ <br />
if (document.all)<br />
{<br />
obj=document.all['thediv'];<br />
H=document.body.clientHeight;<br />
divH=obj.clientHeight;<br />
}<br />
else<br />
{<br />
if (document.layers) <br />
{<br />
obj=documet.layers['thediv'];<br />
H=window.innerHeight;<br />
divH=obj.documentHeight;<br />
}<br />
else<br />
{<br />
obj=document.getElementById('thediv');<br />
H=window.innerHeight;<br />
divH=obj.offsetHeight;<br />
}<br />
}<br />
T=H-divH;<br />
if (document.layers) <br />
{<br />
obj.top=T;<br />
obj.visibility="visible";<br />
}<br />
else<br />
{<br />
obj.style.top=T;<br />
obj.sytle.visibility.top="visible";<br />
}<br />
}<br />
//--><br />
</script><br />
<br />
I don't have time to play with it, but it should be pretty close. Might<br />
need some adjustments for margins and such.<br />
<br />
Cd&<!--content-->
 
Back
Top