Home >Web Front-end >HTML Tutorial >CSS nested DIV layout_html/css_WEB-ITnose

CSS nested DIV layout_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:31:441030browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn