开发者

CSS 100% height in ie [duplicate]

开发者 https://www.devze.com 2023-02-09 10:22 出处:网络
This question already has answers here: 开发者_开发知识库Div 100% height works on Firefox but not in IE
This question already has answers here: 开发者_开发知识库 Div 100% height works on Firefox but not in IE (8 answers) Closed 8 years ago.

Why does height:100% not work in IE. How can we get around this.


try

* html .class{ height:100% }


You have to set height:100% to all the parents up to body. Try this (it works):

`<html><body style="height:100%;"><div style="height:100%;background-color:red">Here it is!</div></body></html>`
0

精彩评论

暂无评论...
验证码 换一张
取 消