height of tables

Posted on 2002-07-22
Last Modified: 2010-04-09
I have several nested tables. I have set all of their height's to 100%.  When I load the page, they don't fill the entire screen vertically.  However, when I reload the page, they do.
Doesn't make any sense to me...What's going on?
Question by:spandex44
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
LVL 51

Expert Comment

ID: 7169942
which browser?
Could you post an example.
I suggest to use following

table { border-spacing:0px; margin:0px;padding:0px}

<table cellpadding=0 cellspacing=0> ... </table>
LVL 53

Expert Comment

ID: 7169952
height on a table is non-standard, so you cannot rely on consistent behaviour across browsers.  Percentage heights are just about the most unreliable thing there is.  Using nested tables for layout just compounds the problem; especially in Netscrap.  If yo post the code or a link to the page, perhaps we can hack it enough to make it work the way you want, but a better approach would be to do your layout control with CSS.  Tables were never intended to be used to control layout, and are the most mis-used and abused elements in HTML.


Author Comment

ID: 7170489
Well, I am looking at the page with IE 6.0.

The page can be seen here:

Any page at that site has the same problem (just click on any links).  The texture is supposed to go all the way to the bottom of the screen, but upon initial loading, it stops about 20 pixels before...

Any suggestions?  How could I do this with CSS?
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

LVL 53

Accepted Solution

COBOLdinosaur earned 200 total points
ID: 7170509
Try this in the head:

body {margin:0px 0px 0px 0px}

I just came off of another question with a similar problem with IE6.  It seems to apply a default margin around everything.

If that does not work try setting the margins to -20px.

Otherwise you will have to see if Micro$oft puts out a bug fix or decides that is an enhanced feature of the browser.

LVL 51

Expert Comment

ID: 7170518
- are all tables like:
   <table cellpadding=0 cellspacing=0>
- do all width and height values the real values of used pictures?
- is the summ of all heights the height of the outermost table?

I also suggest
in the table stylesheet (not shure if IE handles this)

Author Comment

ID: 7170594
I set the margins to -20px and that worked.  Thanks a lot!

Thanks to the others as well!
LVL 53

Expert Comment

ID: 7171641
An ugly solution, but you hvae to get around the browser bugs somehow.  Glad we could help.  Thanks for the A. :^)


Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question