Home > Web Front-end > HTML Tutorial > Solution to the problem that the container cannot automatically adapt to the height after all the objects in the container are set to float attributes during CSS DIV typesetting_html/css_WEB-ITnose

Solution to the problem that the container cannot automatically adapt to the height after all the objects in the container are set to float attributes during CSS DIV typesetting_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:28:36
Original
1285 people have browsed it

When all objects in a DIV container are set to float attributes, the container cannot automatically adapt to the height.

There are two solutions:

Add an empty DIV tag at the end of the container, set its style to clear:both, and then hide the DIV. Set the container style overflow:hidden/auto and zoom:1 (the zoom attribute is for compatibility with IE6).
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