在div IE8上使用样式显示表的问题 [英] Problem using style display table on div IE8
问题描述
您好,
我正在尝试在IE8上使用带有样式显示属性表和表格单元格的DIV。
这似乎不是这是一个简单的html测试:
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html dir =" ltr" >
$
< head>
< title>标题< / title>
< meta content =" text / html;字符集= UTF-8英寸HTTP的当量= QUOT;内容类型" />
< style>
&NBSP;&NBSP;&NBSP; #header {
}
#main {
宽度:100%;
display:table;
}
#left_col {
宽度:20%;
显示:table-cell;
}
#right_col {
宽度:20%;
显示:table-cell;
}
#page_content {
显示:table-cell;
}
#footer {
}
< / style>
< / head>
< body>
< div id =" header">标题文字< / div>
< div id =" main">
&NBSP;&NBSP;&NBSP; < div id =" left_col">左栏文字< / div>
&NBSP;&NBSP;&NBSP; < div id =" right_col">中间列文字< / div>
&NBSP;&NBSP;&NBSP; < div id =" page_content">页面内容文字< / div>
< / DIV>
< div id =" footer">页脚文字< / div>
< / body>
< / html>
它正在使用IE7和FF。
我使用的是IE8.0.7600.16385。
我做错了吗?
谢谢,
Itay 。
上面的代码完全适用于IE8,但不支持IE6和IE7,因为6和7不支持显示表和表格单元格。
有关详细信息,请检查。
Hello,
I am trying using DIV with style display property table and table-cell on IE8.
It's seems not to work.
Here is a simple html test:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" >
<head>
<title>Title</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<style>
#header {
}
#main {
width: 100%;
display: table;
}
#left_col {
width:20%;
display: table-cell;
}
#right_col {
width:20%;
display: table-cell;
}
#page_content {
display: table-cell;
}
#footer {
}
</style>
</head>
<body>
<div id="header">Header text</div>
<div id="main">
<div id="left_col">Left column text</div>
<div id="right_col">Middle column text</div>
<div id="page_content">Page content text</div>
</div>
<div id="footer">Footer text</div>
</body>
</html>
It's working on IE7 and FF.
I am using IE8.0.7600.16385.
Is I am doing something wrong?
Thanks,
Itay.
Hi,
The above code perfectly works with IE8 but does not support IE6 and IE7, as ie 6 and 7 does not support display table and table-cell.
For more information please check.
这篇关于在div IE8上使用样式显示表的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!