View Full Version : Stupid HTML Question.
viGeek 06-06-2002, 01:47 AM I am currently updating my site, however for some reason i cannot remember how to align a table at the very bottom of the page, so it borders the bottom of the browser. I have done this before, but it has been a while. plus its almost 2AM and my eyes are buggy haha, i dont feel like searching google. If anyone knows how to do this, help would be appreciated.
Align = very bottom of page!
Thanks,
Anthony
I beleive i posted this in the wrong forum, sorry its late :(
If someone catches this move it to the appropriete section.
I dunno if this will work:
<table align="bottom">
bigperm 06-06-2002, 02:49 AM I think that has something to do with the body margin being 0.
Use CSS (http://www.w3schools.com/css/css_margin.asp) :)
Chang Lee 06-06-2002, 08:48 AM Make sure you have these attributes set within your 'body' tag:
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
Make sure you have this attribute set within your 'table' tag:
<table height="100%">
Thats it! If this doesn't work, PM me with a link to your page, I will look into what the problem is.
Kaumil 06-06-2002, 09:16 AM For sure it's the margins!
ToastyX 06-06-2002, 10:08 AM He didn't ask about margins. I think he wants something like this:
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top>
Body goes here.
</td>
</tr>
<tr>
<td valign="bottom">
Footer goes here.
</td>
</tr>
</table>
</body>
viGeek 06-06-2002, 01:50 PM Correct, my body tags already have the correct attributes.
I am looking for something like toasty stated. However i cannot find the correct attribute. I tried the attribute bottommargin=0 in the table tag. however it dosent wana seem to work!
If anyone knows this please let me know!
Gadgy 06-06-2002, 02:02 PM not sure how to align it to the bottom but ...
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="8" cellspacing="0" cellpadding="0" align="center" height="100%">
<tr>
<td></td>
</tr>
</table>
</body>
CyberScript 06-06-2002, 02:49 PM This will do it using css:
<table border="0" width="100%" style="position: absolute; bottom: 0;">
<tr><td>blah!</td></tr>
</table>
ToastyX 06-06-2002, 04:17 PM ...but you don't need CSS. What's wrong with what I posted?
CyberScript 06-06-2002, 04:26 PM ...nothing is wrong with your example, I was just showing a css example.
GnomeyNewt 06-06-2002, 04:40 PM What was wrong with what ToastyX put? That to me seems like what you are looking for... Since you said something about a table, below is his code modified with a table in it.
Also, bottommargin=0... sounds like you are asking about margins now, not alignment. Are you looking for how to align the the table to the bottom? (<td valign=bottom>) OR are you looking for margins? (cellspacing=0 cellpadding=0)
---------------
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<table><tr><td>CONTENT</td></tr></table>
</td>
</tr>
</table>
</body>
viGeek 06-06-2002, 06:35 PM That is correct, however for some reason i thought <td align=bottom> would place the text in the table, at the bottom of the table. I will give it a go and see how that works.
GnomeyNewt 06-06-2002, 09:00 PM You are correct.. in a way. It places anyting inbetween the <td> tags on the bottom, not just text.
Also... It is valign=bottom... not align.
There is no way to valign the table. the <table> tag does not know valign or atleast I've never used it there.
viGeek 06-07-2002, 12:50 AM Thanks to all who assisted me. I found that in my <body> tag i did not have bottommargin=0. Once again thanks!
Chang Lee 06-07-2002, 03:55 AM VIGOR: I'm quite curious as to which browser and version you are using. I have been designing web pages for a very long time now and never ever had problems with aligning a table at the bottom of any webpage before. And i never did need to use the 'bottommargin=0' attribute before too.
In any case, the 'bottommargin' tag is not commonly used in the first place by most web designers. so your problem has tickled my curiousity! :D
GnomeyNewt 06-07-2002, 04:26 AM Same here... I never even knew that tag exisited?
viGeek 06-07-2002, 02:19 PM The bottommargin tag exists, it makes sure the body aligns to the very bottom.
I am using IE Explorer 5.5
HTH
|