Closed Bug 63534 Opened 24 years ago Closed 24 years ago

content w/ height 100% wont fill cell if nested

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 30692

People

(Reporter: mdelvecchio, Assigned: karnaze)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
BuildID:    2000122105

When attempting to fill a cell w/ a: <div style="height: 100%">s</div>  or  
<table height=100%><tr><td height=100%>s</td></tr></table>, it wont stretch it 
out. this seems like a bug, because *outside* of a nested table, the div/table 
stretch just fine.
 
also tried w/ "table-layout: auto;" and even fixed. nothing.

Reproducible: Always
Steps to Reproduce:
1. build a multi-celled table
2. build a div or table w/ a 100% height--it's stretchy!
3. stick that element into first table's cell. no more 100% height.

Actual Results:  nested content is only as tall as content (in this case, 
the "s").

Expected Results:  made the element as tall as possible--the thought being that 
a hieght of 100% fills to as much space as possible in the holding cell.

ive seen some similar bugs reported, but not sure if this is the same.
mdelvecchio, could you please attach a testcase that demonstrates this bug using
the create attachment link, as I am not sure the url's current contents are
meant to show just this bug.  Thanks.
I ran the testcase through the validator.w3.org and it had a lot of errors. Try
fixing the errors and see if it works.
Keywords: testcase
nope..the only "errors" on the page are my lack of quotes around height=xx and 
other attribute values. but quotes dont affect the html, well-formed or no...i 
could put them in but that wont change anything.
 
also, on a table, it says height=100% is not a valid attribute. this is true. 
but i put that in because the "height:100%;" on the DIV element didn't produce 
any results, either....
 
my point is, what you see is the problem: no method of trying to specify a 100%-
fill height works. it wont stretch to consume all available space. this is the 
bug that sucks for designers.
This is (I guess, I haven't checked the source so am not marking this INVALID)
actually per CSS2, which leaves only one way of making an object the height of
a viewport, namely:

   .full { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }
what, "position: fixed;"? how does that pertain to height...
 
css has the height: <length> attribute. why doesnt height: 100%; work? it does 
for width:. it does in IE. this is the bug.
 
see my attachment: even w/o the nested table, putting a nested DIV "w/ bgcolor: 
red; height: 100%;" does not produce a filled red box in Mozilla. this is the 
bug i am reporting....
As you say -- it does in IE. This is the bug. IE gets it wrong. According to the
CSS2 specification, percentage heights only apply to blocks whose containing 
blocks have an explicit height (height is not set to 'auto'). This is not the 
case for any element in a normal document. If a percentage height is used on an
element whose containing block has an 'auto' height -- i.e., a height that 
depends on its contents -- then it should, per the spec, be treated as 'auto'.
That is what we do. IE does not do this, and hence is buggy.

By positioning the element fixed to the viewport (position:fixed) you can force
the element to have an explicit height. We support this. This is the standard
compliant way of getting the effect I believe you are looking for.

However I am still not invalidating this bug since we need to examine the issue
of cell nesting that you have brought up.

*** This bug has been marked as a duplicate of 30692 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
QA contact update
QA Contact: chrisd → amar
 verifed that this is duplicate of bug# 30692
Marking verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: