1
这段代码和FF和Chrome一起工作正常,但IE不行。css:垂直和水平对齐,IE
如何修复此代码与IE(9,8,7)?
<html>
<head>
<style type='text/css'>
.center{
background-color: #336699;
width: 200px;
height: 200px;
display: table;
}
.sub{
display: table-cell ;
vertical-align: middle;
text-align: center;
}
</style>
</head>
<body>
<div class="center">
<span class="sub">
Some text text...<br />
An some more text...
</span>
</div>
</body>
这有什么错呢? – Flash 2011-05-04 12:21:32
有120个问题,你现在应该知道“这个工作,那不”完全没用,并且会让你的问题无处可寻。 – BoltClock 2011-05-04 12:22:09
您应该添加一个,最好是HTML5的文档类型,然后查看是否可以解决问题。此外,我假设您的完整源代码确实包含关闭