Home >Web Front-end >CSS Tutorial >Solution to the problem that the height of the parent div cannot adapt to the height of the child div_CSS/HTML

Solution to the problem that the height of the parent div cannot adapt to the height of the child div_CSS/HTML

WBOY
WBOYOriginal
2016-05-16 12:03:312147browse

Copy code The code is as follows:




When there is a lot of content, even if the parent sets the height to 100% or auto, it still cannot fully automatically stretch under different browsers. The solution is as follows:

Copy code The code is as follows:





Create a space with a height of 1 at the bottom of the layer to solve this problem.

There is also something like this:

or
.
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