100% Table Height Problems

This is a discussion on "100% Table Height Problems" within the Web Page Design section. This forum, and the thread "100% Table Height Problems are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 3rd, 2005, 03:48
Junior Member
Join Date: Mar 2005
Location: Australia
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
100% Table Height Problems

I am designing a website where the table is 100% in height and at the bottom of this table is a footer image.

But when i preview my results in a browser the footer is up just under the header. I'm confused because the table code I used from one site is not working for me this time.

Code: Select all
<BODY LEFTMARGIN=0 MARGINWIDTH=0">
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center" height="100%">
  <tr>
    <td valign="top"></td>
  </tr>
  <tr>
    <td height="21" valign="middle" bgcolor="#FF0000"> 
    <div align="center" class="normtext"></div>    </td>
  </tr>
</table>
</BODY>
Reply With Quote

  #2 (permalink)  
Old Jul 3rd, 2005, 10:34
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
what html doctype are you using? it wont work in XHTML, so if i ever need to make a table 100% high, i just usually remove the doctype.
Reply With Quote
  #3 (permalink)  
Old Aug 1st, 2005, 13:07
ST ST is offline
Junior Member
Join Date: Jul 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Is it wise to remove the doc type? Could it make compatibility problems or stuff?
Which is the doc type to us in that case?
Reply With Quote
  #4 (permalink)  
Old Aug 2nd, 2005, 04:03
Reputable Member
Join Date: Jul 2005
Location: Indiana, USA
Age: 29
Posts: 153
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I agree with ST, it is probably not a good idea to remove the doctype for several reasons: it will not validate, it really isnt good coding (or at least clean), and it probably isnt cross browser compatiable. Granted it works, but there is probably a different solution.
Last Blog Entry: Whats in a name? (Feb 20th, 2008)
Reply With Quote
  #5 (permalink)  
Old Aug 2nd, 2005, 05:58
ST ST is offline
Junior Member
Join Date: Jul 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Here is a nice link where they explain the different doc types (not that I truly fully understand it …lol)

http://www.w3schools.com/tags/tag_doctype.asp


I use the following doc type to solve the problem of our friend joshcxa:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

*I’ve removed the second half because I noticed that it caused an horizontal scroll bar for no reason in that frame.


Do some one have the same problem¿
Reply With Quote
  #6 (permalink)  
Old Aug 3rd, 2005, 03:12
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
First off, I don't see any image in your code, so I'll just assume it's in that <div> in the second <td>.

Also, not all browsers handle height=100% the same way, whether it's valid code or not.

Are you trying to keep a footer at the bottom of the table, or at the bottom of the viewport?

If it's the former, you're code is fine, you just need to fill in some content in the top <td> and it will push the "footer" down.

I'm assume you're looking for the latter, which in that case I'd put the footer in it's own <div> below the </table> tag and before the </body> tag, then give it some CSS.

Of course, this is all wishy-washy depending on your browser and the quality of the code.

Added: Check this out for proper doctypes: http://webstandards.org/learn/templates/
Reply With Quote
Reply

Tags
100, table, height, problems

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to constrain the height of a dynamic table MrQuestions Web Page Design 3 Mar 15th, 2008 00:08
Table height 100% subhadip Web Page Design 4 Sep 26th, 2007 14:15
How to make a table height equal to the browser height ? subhadip Starting Out 4 Sep 20th, 2007 07:56
Problems with height in a table-row element llpamies Web Page Design 3 Aug 9th, 2007 18:02
Table Height 100% only when refreshed…. mrunclesam Web Page Design 9 Dec 22nd, 2006 15:05


All times are GMT. The time now is 04:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43