|M| 如何控件Table的 cellspacing 我想要他的左边和加边不要
<table border="1" cellspacing ="5">当这样的时候网站的Table之间就会有间隔
<tr>
<td>
1
</td>
<td>
2
</td>
</tr>
<tr>
<td>
3
</td>
<td>
4
</td>
</tr>
</table>
现在我设置是5PX
但是我想要让Table的最左边和最右边 也就是左右边框不要有间隔
要怎么办呢
我怎么搞也搞不好
谢谢 --------------------编程问答-------------------- 试试有没有 border-right-width,border-left-width属性,有的话设置成0看看 --------------------编程问答-------------------- FRAME Attribute | frame Property Internet Development Index
--------------------------------------------------------------------------------
Sets or retrieves the way the border frame around the table is displayed.
Syntax
HTML <TABLE FRAME = sFrame... >
Scripting TABLE.frame [ = sFrame ]
Possible Values
sFrame String that specifies or receives one of the following values.void Default. All outside table borders are removed.
above Border on the top side of the border frame is displayed.
below Border on the bottom side of the table frame is displayed.
border Borders on all sides of the table frame are displayed.
box Borders on all sides of the table frame are displayed.
hsides Borders on the top and bottom sides of the table frame are displayed.
lhs Border on the left side of the table frame is displayed.
rhs Border on the right side of the table frame is displayed.
vsides Borders on the left and right sides of the table frame are displayed.
The property is read/write. The property has a default value of void.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Example
This example uses the FRAME attribute to render different border frames.
<TABLE FRAME="above">
<TR><TD>A table with</TD><TD>the value of frame set to "above"</TD></TR>
<TR><TD>cell</TD><TD>cell</TD></TR>
</TABLE>
--------------------编程问答-------------------- 你也可以设置内容到上下的距离呀,如:padding-top:5px;表示内容到上边界的距离为5px。你看能不能帮上忙。 --------------------编程问答-------------------- RE:padding没有用的 我的是 cellspacing ="5"
--------------------------
也就是间距为5px
然后我要这个Table的最左和最边边的cellspacing =0
要怎么办呢 --------------------编程问答-------------------- 顶一下 --------------------编程问答-------------------- 怎么解决的? 我也碰到这问题了。 --------------------编程问答--------------------
table {--------------------编程问答-------------------- <table border="1" cellspacing="0" cellpadding="5">
margin: 5px 0;
}
<tr>
<td>
1
</td>
<td>
2
</td>
</tr>
<tr>
<td>
3
</td>
<td>
4
</td>
</tr>
</table>
补充:.NET技术 , ASP.NET