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
Release: 2016-05-16 12:03:31
Original
2146 people have browsed it

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