我正试图得到这个... http://jsfiddle.net/K2NPz/1/
变成了... http://postimage.org/image/1zjcktz2c/
左图是现在的,右图是理想中的。我似乎无法让它工作,因为继承属性(和 100%)实际上没有做任何事情。它确实在 Quirks 模式下工作,但我需要它与实际的 Doctype(HTML5 或 XHTML 1.0 Strict)一起工作。
最佳答案
height:100%
表示父元素的 100%,但是 renderzone
div 没有指定高度。根据the W3C's specifications , 当 "height:100%"...
If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'.
围绕“auto”的逻辑相当复杂,所以我不能给你一个如何使用它的答案,但我可以通过设置所有父容器(包括"body"& "html") 到 height:100%
按照 this document 的建议.它需要调整,但应该让您朝着正确的方向前进。
关于CSS列高不继承,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7878294/