1. Look at the following example:
(1) HTML part content
(3) Calculate the distance of the following image:
(4) Explanation:
In the standard flow: I. The horizontal margin between inline elements is cumulative II. The vertical margin between block-level elements is collapsed III. If nested boxes If the parent does not specify a size, the default setting of the parent box is the size that exactly contains the child box; if the parent box specifies a size, when the size of the parent box is smaller than the child box, IE6 will automatically adjust the size of the parent box to adapt to the inclusion relationship, and Firefox will not automatically adjust.
The above is the detailed content of Detailed explanation of CSS box distance calculation. For more information, please follow other related articles on the PHP Chinese website!