Front page and admin page UI design(Html/CSS)
How to deal with the floating problem of div cover when divs in the position of up and down?
In this case, both div1 and div2 have the attribute of “float:left”, and we expect the result is left image not the right one.
But It will be wrong if you do not add the attribute of “clear:both” in div2. Thus, we should clear the floating case if up
div has the floating attribute.
How to deal with the problem of setting the margin distance between two up div and one down div?
The left picture is what we need when we want to set the margin. But It will fail if you set the margin-top with div3,
rather than setting the margin-bottom with div1 and div2. Sometimes we cannot find the wrong reason if you did
not follow the CSS grammar correctly.