HTML_TABLE内外边框颜色设置及页面居中

 

HTML_TABLE内外边框颜色设置及页面居中

时间: 2009.05.07 11:32:00 

标签:  

<table width="100%"  cellpadding="0" cellspacing="0" bgcolor="#a1a1a1" id="table2">---此处设置外边框颜色

<tr >

<td bgcolor="#ffffff" colspan="6" height="25" align=center><font color=#ea5e01 size=3><strong>房屋基本信息</strong></font></td>

</tr>          

<tr>

<td bgcolor="#E6E6FA" height="25" width="13%" align=center>房屋狀態</td>

<td bgcolor="#ffffff" width="20%" valign=center  >---此处设置单元格边框颜色

$TYPE$</td>

<td bgcolor="#E6E6FA" width="13%" align=center >房屋類別</td>此处设置单元下边框颜色

<td bgcolor="#ffffff" width="20%" valign=center >$FWLB$</td>

<td bgcolor="#E6E6FA" width="13%" align=center>所在地區</td>

<td bgcolor="#ffffff" width="20%" valign=center >$XS$</td>

</tr></table>



bordercolor="#254389"----设置所有边框颜色


style= "border:1px solid #000000;border-right-color:#FF0000;"

整体加边框: border:1px solid #000000;   1PX为边框大小,#000000为颜色! 

只给某一边加边框: 右边框 border-right-color:#FF0000; 

左边框 border-left-color:#FF0000; 

上边框 border-top-color:#FF0000; 

下边框 border-bottom-color:#FF0000;