force table height 100%

S

shank

How do you force a nested table height to fill-in the entire space provided?
<table style="width:100%; height:100%" cellpadding="0" cellspacing="0"> Does
not work

I have a nested table inside a cell that will change in height.
I want the nexted table forced to 100% height.
How?
thanks
 
S

spaghetti

How do you force a nested table height to fill-in the entire space
provided?
<table style="width:100%; height:100%" cellpadding="0" cellspacing="0">
Does not work

It does if the browser is in quirks mode. Quirks mode is when the browser
behaves like a bad browser just to render old, improperly-coded pages.

http://www.hut.fi/u/hsivonen/doctype.html

There is no proper way to make "height: 100%" take up all available space.
You probably can mimic the behavior with background colors in the
containing cell or something.
 
J

Jonathan Amend

I'd just put a spacer image with height=100%.

spaghetti said:
It does if the browser is in quirks mode. Quirks mode is when the browser
behaves like a bad browser just to render old, improperly-coded pages.

http://www.hut.fi/u/hsivonen/doctype.html

There is no proper way to make "height: 100%" take up all available space.
You probably can mimic the behavior with background colors in the
containing cell or something.
 
W

Whitecrest

Doesn't sound like tabular data to me. What are you actually trying to
do?
http://www.allmyfaqs.com/faq.pl?Tableless_layouts

The only problem I see with this example, (and others like the Holy
grail of 3 columns) they work great, unless you have a complicated
layout, and have to deal with IE and borders and padding. Then you are
up the proverbial creek.

Yea, there may be work arounds, or someone's solution might be to change
the layout, but sometimes those choices may not be available. But we
already know that tables will do it. This is not to say one should
always use tables for layout, but every now and then, it makes sense.
 
B

brucie

in post: <
The only problem I see with this example, (and others like the Holy
grail of 3 columns)

3 col layouts suck, everything is squished up weeny with only a few
words fitting on each line. it takes 3.2 years just to scroll so you can
read it and if the moron author is using a fixed size you have to not
only scroll vertically but also horizontally to read the end of each and
every line of text adding a further 4 years.
 
B

Barry Pearson

shank said:
How do you force a nested table height to fill-in the entire space
provided? <table style="width:100%; height:100%" cellpadding="0"
cellspacing="0"> Does not work

I have a nested table inside a cell that will change in height.
I want the nexted table forced to 100% height.

Why? Is it important that the nested table has that height? Is the nested
table itself to be made visible (for example, via its borders or background)?
If its borders don't show, why would anyone care how high it is? Isn't it more
important what the content of the nested table does?

I suspect that if you sketched out what you want the layout to look like in
different circumstances, you may end up asking different questions.

There are cases where it is possible to force a table to have height 100%,
even with valid Strict HTML. But the one I know of is not what you want. I
don't know how to make them expand to the height of a cell. See, for example:
http://www.barry.pearson.name/articles/table_pages/single_cell.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top