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

CSS nested DIV layout_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:31:44
Original
1033 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template