CSS min height-vertical margins can not solve the problem of combined

  The combined vertical margins there is a case from the vertical outer nested elements combined, when the parent element is not set from the outside, the outside vertical sub-element from the top or bottom edge of the parent and will be combined, leading to the parent class has also been "invisible" vertical margins.

  When the parent element is encountered min-height vertical outer edge sub-stage of an element, the vertical margins merge the problem becomes more subtle.

  When setting the height of the parent element, the child elements from the outside will not affect the parent element; when the parent element has no set height, outside the child of an element will affect the parent element, but this when edge against edge sub-element of the parent element, the problem can easily be found; and when the parent element set min-height, and at a distance from the bottom edge of the parent element of the child, when this problem is easy to be ignored a.

  Parent element set min-height, the vertical distance of the outer edge sub-elements will still affect the parent element, regardless of how far the bottom edge of the parent element of the child element. It should be noted, is dead set with different heights.

  As for how to solve, and it simply is not time to set the height of the same.

 

related articles:

1. What is the BFC

2.  CSS merger margins (collapse / margin cross-border)

3.  Vertical Margin merger

Guess you like

Origin www.cnblogs.com/mengyouyouyou/p/11041015.html