Closed
Bug 861014
Opened 12 years ago
Closed 12 years ago
Floating child breaks margins from adjacent selector
Categories
(Core :: Layout: Floats, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 451791
People
(Reporter: shane, Unassigned)
Details
Attachments
(1 file)
1.00 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Steps to reproduce:
Combined adjacent selector and negative margins to have a small margin between elements but a larger margin after the set of them, e.g.:
.field { margin-bottom: 20px; }
.field + .field { margin-top: -15px; }
Added a floating child to that element, e.g.:
.field::after { content: ""; display: block; clear: both; }
.field label { float: left; }
Added multiple elements together, as the only elements in a block, e.g.:
<form>
<div class="field"><label>Label 1:</label></div>
<div class="field"><label>Label 2:</label></div>
</form>
Actual results:
Negative margin was applied to all <div class="field" /> elements.
Expected results:
Negative margin should have been applied to the second <div class="field" /> element.
Comment 1•12 years ago
|
||
Sounds very much like bug 451791.
Updated•12 years ago
|
Attachment #736584 -
Attachment mime type: text/plain → text/html
Comment 2•12 years ago
|
||
Indeed.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•