Home >Web Front-end >HTML Tutorial >CSS nested DIV layout_html/css_WEB-ITnose
Nested DIV layout will involve the CSS position attribute
If the inner DIV sets the position attribute to absolute, and sets left, and top and other attributes, you also need to consider the position attribute setting of the outer DIV.
absolute:absolute absolute positioning, directly specify top, left, right, bottom. Interestingly, absolute positioning is also "relative". Its coordinates are relative to its container. What is a container? A container is a positioned "ancestor" closest to an element. Positioning means that its Position is absolute, fixed, or relative. If there is no such container, use the browser's initial one, which is the body or html element. The standard says that you only need to specify left and right, and width can be automatically calculated based on the width of the container. Unfortunately, IE does not support it.