一个很简单的CSS问题,为什么Table的边框丢失了……
代码如下:
<table style= "border-collapse:collapse;border-color:Black; border-style:solid; border-width:1px " cellpadding=2 cellspacing=2>
<tr>
<td > Department: </td>
<td> <input type=button value= " " runat=server id= "pdepartment " /> </td>
<td> <input id= "idepartment " runat=server type=text /> </td>
</tr>
</table>
一个一行三列的表格,我想让他成为图A这样,但我现在只能看到最外面整个table的边框,而单元格之间的border都没有(如图B),请问应该怎么改?
_______________
|___|____|____| A
________________
|______________| B
------解决方案--------------------用frontpage2003或者dreamweaver调试一下就能看出来
------解决方案-------------------- <table style= "border-collapse:collapse;border-color:Black; border-style:solid; border-width:1px " cellpadding=2 cellspacing=2>
<tr>
<td bordercolor= "#000000 " style= "border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px " > Department: </td>
<td > <input type=button value= " " runat=server id= "pdepartment " /> </td>
<td style= "border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px "> <input id= "idepartment " runat=server type=text /> </td>
</tr>
</table>
------解决方案-------------------- <TABLE ID=oTable STYLE= "border-collapse:collapse;border-color:black; " border= "1 ">
<TR> <TD> EST </TD> <TD> 9:00 A.M. </TD> </TR>
<TR> <TD> CST </TD> <TD> 8:00 A.M. </TD> </TR>
<TR> <TD> PST </TD> <TD> 6:00 A.M. </TD> </TR>
</TABLE>
------解决方案--------------------不能只写table的样式,还要写td,th的样式。
方能显示正常