| Author |
table with height:100% doesn't take up all of parent's height?
|
|
| Jeff Bender 2007-07-05, 6:18 pm |
| http://people.virginia.edu/~kjl3d/testHeight.html
Why doesn't the table with id shouldBeTall have a height that is the
same as it's enclosing td? Firebug tells me that the table's height
is 25 pixels and the enclosing td's height is 300px. Do I need to
specify something different than "style=height: 100%;" ?
| |
|
| On 2007-07-05, Jeff Bender <jigaboophelps@XXXXXXXXXX> wrote:
> http://people.virginia.edu/~kjl3d/testHeight.html
>
> Why doesn't the table with id shouldBeTall have a height that is the
> same as it's enclosing td? Firebug tells me that the table's height
> is 25 pixels and the enclosing td's height is 300px. Do I need to
> specify something different than "style=height: 100%;" ?
You've set a percentage height of an auto-height container which the
spec tells browsers to ignore.
Although in this case you'd think it wouldn't be so hard to see what you
mean, in general the height of a container with auto height often
depends on its contents. So to ask for the contents to be some
percentage of the container is a bit circular and non-sensical.
If you set the <td> that actually contains the <table> to height: 300px
the 100% should work.
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |