html5 css高度100%,html - CSS3 Height 100% - Stack Overflow

I don't know how to ask/write this, so feel free to update the name or point me to the correct question/title.

I am designing a cross html5-css3 site, and trying to make it look the same for every (common) browser.

It works fine with Firefox 14.0.1, Chrome 21.0.1180.6 and Safari 5.1.7, this, with (file:estilo.css) #contenido line height is used to make it fit in Safari and Chrome.

this is the short version of the included 3 css files...

html {height:100%;}

body {height:100%;}

div#Tabla {display:table; height:100%;}

div.row.main {display:table-row-group; height:auto; min-height:100%;}

div#main {display: table-cell; position: relative; height:auto; min-height:100%;}

div#contenido {display:inline-block; position: relative;

height:100%; min-height:100%; line-height:100%;}

section {height:auto; min-height:100%;}

if I change its position to absolute, i got the same look on Chrome 21.0.1180.6 and Safari 5.1.7, Opera 12.

as you can see, #contenedor wont fit 100% height on Opera and IE. How can I fix this?

I'm really new to css styling and stuff, so I don't get what is wrong.

Thank you in advance :)

ps. yes, maybe I am messing everything with css display:table and stuff, but thats where google sent me... haha xD so, yes, you can basically tell me to start again without tables. (I am trying that already, with less results.)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值