萨拉姆(意味着你好)不工作:)显示:表&显示:表细胞在IE9
我想实现一个3栏布局使用display:table
& display:table-cell
我的网页。它工作正常在Firefox和Chrome,我知道this feature should be supported in IE 9,但我取得了至今没有比这更截图:
我怎么能得到这个工作在IE 8+?
这里是我的完整代码:
(JS Fiddle可用)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" Content="text/html;charset=UTF-8">
<style type="text/css">
*{
margin: 0;
padding: 0;
}
html,body{
width:100%;
margin:0;
padding:0;
}
.container{
display:table;
width:100%;
border-collapse:separate;
}
.col{
display:table-cell;
}
.side-1{
width:200px;
background: #efefef;
}
.side-2{
width:200px;
background: #f8f8f8;
}
.content{
}
#header,#footer{
height:40px;
background: #e4f3fd;
}
</style>
</head>
<body>
<div id="header">header</div>
<div class="container">
<div class="col side-1">
sidebar 1
<br>.<br>.<br>.
</div>
<div class="col side-2">
sidebar 2
<br>.<br>.<br>.
</div>
<div class="col content">
content
<br>.<br>.<br>.
</div>
</div>
<div id="footer">footer</div>
</body>
</html>
工作的f或我与IE8,但请注意,使用*表*或CSS *表*显示元素[不适合布局的目的](http://stackoverflow.com/questions/21378240/liquid-layout-with-liquid-left -fixed右列/ 21378465#21378465)。还有一件事,在CSS *表格布局*中,所有元素[应遵循相同的结构属性](http://stackoverflow.com/questions/18516836/how-to-approximate-table-layout-with-css-when - 结构 - 是-脱节/ 18516881#18516881)。 –