Bug 76860 - Sub-elements with a percentage height ignore max-height on the parent element
Summary: Sub-elements with a percentage height ignore max-height on the parent element
Status: RESOLVED DUPLICATE of bug 26559
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 14:13 PST by Silas Brill
Modified: 2012-01-31 17:30 PST (History)
0 users

See Also:


Attachments
Testcase for styles on html and body (372 bytes, text/html)
2012-01-23 14:13 PST, Silas Brill
no flags Details
Testcase for styles on div elements (486 bytes, text/html)
2012-01-23 14:24 PST, Silas Brill
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silas Brill 2012-01-23 14:13:42 PST
Created attachment 123617 [details]
Testcase for styles on html and body

Safari version: 5.1.2

When an element has both a height and a max-height set and a child element has its height set to 100%, the child element's height becomes equal to the value set for the parent element's height, without respecting the parent element's max-height.  However, the parent element's size still respects its max-height, resulting in the parent element and the child element being different sizes.

This bug behaves differently for the html and body elements than for divs, but is present in either case.  Other browsers (Firefox 8 and IE9) handle the html/body case correctly, but behave exactly as Webkit for the div case.
Comment 1 Silas Brill 2012-01-23 14:24:41 PST
Created attachment 123619 [details]
Testcase for styles on div elements

Turns out I was wrong about the situation being different for divs... I had made a mistake composing the testcase.  This testcase demonstrates exactly the same situation as the first one, that is, Webkit gets in wrong (in exactly the same way), whereas Firefox and IE get it right.
Comment 2 Silas Brill 2012-01-31 17:30:23 PST

*** This bug has been marked as a duplicate of bug 26559 ***