Closed
Bug 1125051
Opened 10 years ago
Closed 10 years ago
margin-bottom of <ul> with height less than min-height is ignored
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 616339
People
(Reporter: f.stojentin, Unassigned)
Details
Attachments
(1 file)
280 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; ASJB; rv:11.0) like Gecko
Steps to reproduce:
I defined a list <ul> with a min-height Attribute and a bottom-margin.
Actual results:
When the actual height of the <ul> is less than the defined min-height, the margin-bottom is ignored.
Expected results:
The value for margin-bottom should be always used, not only when the actual height is greater than the min-height.
Reporter | ||
Comment 1•10 years ago
|
||
complete testcase
Updated•10 years ago
|
Component: Untriaged → Layout
Product: Firefox → Core
Version: Firefox 38 → 38 Branch
![]() |
||
Comment 2•10 years ago
|
||
> I defined a list <ul> with a min-height Attribute and a bottom-margin.
No, your min-height is on the parent of the <ul>.
Presumably the question is what happens for margin-collapsing purposes with the bottom margin when min-height is set on the parent... It seems to be collapsing kinda weirdly.
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Block and Inline
Ever confirmed: true
Flags: needinfo?(dbaron)
I believe that http://dev.w3.org/csswg/css2/box.html#collapsing-margins says the margins (bottom margin of li, 0, bottom margin of ul, 40px, and bottom margin of div, 0) should collapse. (Though I hate reading it; see https://lists.w3.org/Archives/Public/www-style/2010Jul/0507.html and https://lists.w3.org/Archives/Public/www-style/2012Mar/0057.html .)
The collapsed 40px margin should, in turn, be outside of the div, according to http://dev.w3.org/csswg/css2/visudet.html#normal-block .
It's possible that fixing this might be as simple as removing this code:
if (autoBSize != contentBSize) {
// Our min-height or max-height made our height change. Don't carry out
// our kids' block-end margins.
aMetrics.mCarriedOutBEndMargin.Zero();
}
in nsBlockFrame::ComputeFinalSize.
Flags: needinfo?(dbaron)
And probably duplicate of bug 616339.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•