You could add overflow:auto
to .body
to prevent margin-collapsing. See http://www.w3.org/TR/CSS2/box.html#collapsing-margins
More Related Contents:
- How to disable margin-collapsing?
- How do I uncollapse a margin? [duplicate]
- When to use margin vs padding in CSS [closed]
- How to remove the border highlight on an input text element
- Change bootstrap navbar collapse breakpoint without using LESS
- Any way to declare a size/partial border to a box?
- CSS Margin Collapsing
- Margin-Top not working for span element?
- Control the dashed border stroke length and distance between strokes
- How do I force a DIV block to extend to the bottom of a page even if it has no content?
- Hover effect : expand bottom border
- How does border-image work with linear-gradient?
- Double border with different color [duplicate]
- html, css – weird invisible margin below pictures
- Borders not shown in Firefox with border-collapse on table, position: relative on tbody, or background-color on cell
- Set position absolute and margin
- Remove “whitespace” between div element
- Border within border CSS
- What is the difference between outline and border CSS properties?
- Remove all padding and margin table HTML and CSS
- How to reset / remove chrome’s input highlighting / focus border? [duplicate]
- Removing the image border in Chrome/IE9
- How do negative margins in CSS work and why is (margin-top:-5 != margin-bottom:5)?
- Can I have different colored left and top borders in CSS?
- Creating space between an element and its border
- text flowing out of div
- Why were margin collapse rules introduced in CSS?
- input type=”image” shows unwanted border in Chrome and broken link in IE7
- Inner border over images with CSS?
- CSS: clean solution to the margin collapse issue when floating an element