HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
How to stick last table row to the bottom of page
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
milesss



Joined: 06 Sep 2009
Posts: 1

PostPosted: Sun Sep 06, 2009 2:00 am     How to stick last table row to the bottom of page Reply with quote

Hello m8s

I Need little help - I tried many combination's and did not find out how to stick last "RED" table row to the bottom of page...

Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
   margin-left: 0px;
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="green">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="red"><div align="center">Test by Milesss</div></td>
  </tr>
</table>
</body>
</html>
sticks464



Joined: 31 Dec 2006
Posts: 2308

PostPosted: Sun Sep 06, 2009 7:21 am     Reply with quote

You can't do it with a table but you can with a div by wrapping all the content with a div and placing a fixed position div outside the table.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
   margin: 0px;
}
#wrapper {
width:500px;
margin:0 auto;
overflow:visible;
position:relative;
}
table {
width:500px;
border:0;
padding:0;
}
#bottom {
background:red;
position:fixed;
left:50%;
bottom:0;
width:500px;
text-align:center;
margin-left:-250px;
}

-->
</style></head>

<body>
<div id="wrapper">
<table cellspacing="0">
  <tr>
    <td bgcolor="green">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td></td>
  </tr>
</table>
<div id="bottom">Test by Milesss</div>
</div>
</body>
</html>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial