W3C home > Mailing lists > Public > www-html@w3.org > April 2002

Re: Table height %

From: David Emmerson <david_emmerson@btinternet.com>
Date: Sat, 20 Apr 2002 10:12:29 +0100
Message-ID: <000901c1e84b$7fefd5a0$ab687ad5@gondor>
To: <www-html@w3.org>
> > I tried using the CSS attribute height: 100%, but that seems to be not
> > valid according to the CSS spec.
>
> You tried to *make up* a CSS attribute 'height: 100%' ;-)
>

Height isn't a made up property.

> We've discussed this a number of times on the CSS-Discuss list at
> westciv.com and basically there is no CSS way to do it in XHTML

The only reason it doesn't work is because the table has nothing
to be 100% of (assuming it's the only child of body).

One way to fix the problem (out of a few):

body {
 position: absolute;
 top: 0; left: 0;
}

 body, #myTable {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
 }

 <body><table id="myTable">...</table></body>


> although some folks have come across some hacks here & there...
> Nothing you'd want to use in production IIRC.

Not sure if you'd count the above as a hack, but yes it's probably not
something you'd want to use in production (given that it's a misuse of
tables)

 Dave.
Received on Saturday, 20 April 2002 05:12:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:51 GMT