CSS 高度 100% 的问题
我一直在研究与此相关的许多其他问题,但我似乎仍然无法解决。我有一个简单的 HTML 和 CSS 文档。由于某种原因,我无法让内容标签在 100% 高度下正常工作。我一直在查看父对象,即 body 和 html,以确保它们也具有 100% 的高度(它们确实如此),但仍然没有任何内容。我使用的 HTML 代码如下;
HTML 在这里 > http://pastebin.com/ZmJeneie CSS在这里> http://pastebin.com/NWVdMv8i
编辑:可以在此处找到该页面的示例 > http://steelfoot.com/test/ 我正在尝试填充内容块(并推送版权见底部)。
有什么指示吗?
I've been looking at the numerous other questions related to this but i still can't seem to sort it out. I have a simple HTML and CSS document. For some reason i'm unable to get the content tag working correctly with a 100% height. I've been looking at parent objects i.e body and html to make sure they also have a height of 100% (which they do) but still nothing. The HTML code i'm using is as follows;
The HTML is here > http://pastebin.com/ZmJeneie
The CSS is here > http://pastebin.com/NWVdMv8i
EDIT: an example of the page can be found here > http://steelfoot.com/test/ I'm trying to get the content block to fill (and push the copyright to the bottom).
any pointers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加“高度:100%;”到#wrapper。您需要在对象的所有父级上定义%高度才能使其工作。不仅在 html 和 body 上。
Add "height: 100%;" to #wrapper. You need to have % height defined on all parents of object to make it work. Not only on html and body.