为什么我的100%高度div不会扩展到100%的父?不是浮点 [英] Why won't my 100% height div stretch to 100% of parent? Not a float

查看:85
本文介绍了为什么我的100%高度div不会扩展到100%的父?不是浮点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://thestleonardsacademy.org/stlan/extracurricular.php

body html 是100%, #content 容器是100%,但是子 #newstiles 将不匹配我设置的100%高度。我可以设置一个固定的高度,这增加了超过目前似乎使用的自动高度,但100%什么也不做。

The body and html are 100%, the #content container is 100%, but the child #newstiles won't match the 100% height that I set. I can set a fixed height, which increases it beyond the auto height that it currently seems to use, but 100% does nothing.

我必须疯了,非常明显!

I must be going mad, or missing something very obvious!

推荐答案

尝试添加

height: 100%;

到您的#content样式。您只定义了max-height和min-height。

to your #content style. You only defined max-height and min-height.

这篇关于为什么我的100%高度div不会扩展到100%的父?不是浮点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆