语法也不对 ,css中是根本没有 = 的
我写了个尽量类似的 你看看效果如何
<html>
<head>
<title>table test</title>
<style type="text/css">
#layout, #layout td {
border: 1px solid black
width: 100px
height: 200px
border-collapse : collapse
}
</style>
</head>
<body>
<table id="layout">
<tr><td>test1</td><td>test2</td></tr>
</table>
</body>
</html>
你最好给你的table加一个类名。比如<table class="table_A">,<table class="table_B">。否则你写在一个页面里的两个样式若有重复,则只有后面的定义起作用,例如宽度。
最严重的是,你所画的所有引用该样式的页面的所有table都是一个样子。
第一个:
table.table_A{width:100%border:noneborder-collapse:collapse}
table.table_A td{border:none}
第二个:
table.table_B{width:980margin:autoborder:noneborder-collapse:collapse}
table.table_B td{border:none}