html tutorial - How to fix the issue of CSS collapsing parent having floating children - html5 - html code - html form
Answer: Use the CSS clear Property
When float property applied to the element in the non floated parent, the parent element does not stretch automatically to the floated elements.This behavior is know as collapsing parent if you not apply some properties like background or borders to the parent elements,and it deal to prevent layout and cross-browser problem.
Fixing Collapsing Parents in Current Browsers
The CSS :after
pseudo-element having the content to resolve the confusing parent problems in browsers like Firefox, Chrome, Safari, IE8.
Example
Check out the tutorial on CSS Alignment for more solutions on fixing collapsing parents.