Closed
Bug 35554
Opened 24 years ago
Closed 24 years ago
CSS2 borders displaying on components with no height
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
VERIFIED
FIXED
People
(Reporter: lordpixel, Assigned: troy)
Details
(Keywords: css2)
Attachments
(2 files)
Please see the two attachments I'm going to add: simplified.html and simplified.css You have have to download these to disk to see the example. There seems to be something rather odd going on with the handling of the height and max height on fixed position elements... The example shows two nested fix position elements, the outer div is green, the inner one is orange, but its sized in such as way so that you can't see any green. The red and yellow DIVs merely serve to show how the white borders on the inner orange div are behaving. The immediate bug is this: The orange div has max-height: 100%; However this is being rendered incorrectly - as the DIV has no content it has no intrinsic height. Max height according to CSS2 sections 10.7 and 10.6.4 max- height should only come into play if the ordinary computed height is greater than the max-height. This cleary cannot be the case for a div with no intrinsic height. Mr Baron (see cc: above) believes the correct rendering for this test case is for no orange to be visible at all. Further - if one changes max-height:100% to height:100% the display does not change. This would imply max-height is being treated as height. If further evidence is needed, try removing all reference to height/max-height from the orange div - it collapses away to nothing - well almost - the bottom border is still displayed! This does not seem right. Especially since if one also turns off the bottom border, no part of the right border is seen in the green box. All in all, its pretty inconsistent when dealing with height and width. [As an aside - I don't like the way that the horizontal right border renders inside the orange div, but the vertical bottom border renders outside it. Mr Baron has convinced me that this is correct behaviour when "height:100%;" is set, because height refers to the content height and the box is over constrained if its content is 100% and it has borders, so they spill outside. It remains ugly when compared to the rendering of the right border though. This is pretty much unrelated to the actual bug report.]
Reporter | ||
Comment 1•24 years ago
|
||
Apologies. Forgot to say build is Netscape 6 pr1 platform is Mac OS 9 but I would suspect this is fundamental to the Mozilla CSS implementation and applies to all platforms and recent builds.
Keywords: css2
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Confirming bug and changing component to Layout and reassigning. Also changing from Mac/Mac9.0 to All/All since I've seen this on a Linux build from a few days ago. There's a similar bug relating to replaced elements somewhere (but I forget whether it's max-width or max-height).
Assignee: pierre → troy
Status: UNCONFIRMED → NEW
Component: Style System → Layout
Ever confirmed: true
OS: Mac System 9.0 → All
QA Contact: chrisd → petersen
Hardware: Macintosh → All
Fixed. Now no orange is visible
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•24 years ago
|
||
Confirm max-height bug fixed as of build 200041915 However, if you look at the attached example in this build, you can see the other problem mentioned, the border display, is still there... i.e. now the max-height is being collapsed to 0 as required, but the bottom border is still visible (at the top of the green area there's a white strip - this is the bottom border of the orange region,(the orange region that now has no height)). This is inconsistent with the way that left and right borders are handled. If one alters the orange div to have only a right border (by deleting the bottom border) one can see no part of this right border. Whether this is a bug as far as the spec is concerned or merely cosmetic I don't know, but it seems symptomatic of something inconsistent in the handling of left/right top/bottom borders...
Severity: normal → minor
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: CSS2 property max-height is being hishandled → CSS2 borders displaying on components with no height
The border handling makes perfect sense. When there's no height, and only a right border, the right border should have 0 length. But when there's no height and a bottom border, the border should be the length of the width.
David beat me to it, but that's exactly what I was gong to say as well. marking FIXED again, because the max-height issue has been fixed
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•