表边框陌生

时间:2013-07-28 15:45:45

标签: html html-table

我正在对页面进行一些修改,大规模重组表格的生成方式,同时试图保持页面的前端相同。我大部分时间都取得了成功,除了桌面边框有点棘手。

这是页面的外观: enter image description here

目前的情况如下:

enter image description here

这在一定程度上影响了我重做的每一张桌子。

原件是一张桌子,用空格子来填补间距。由于某些链接仅在用户具有特定权限时才会显示,

所讨论的所有表格都有以下定义(宽度已更改)

<table border="0" cellpadding="0" cellspacing="0" width='180'>

我尝试在外表上设置一个表border = 1,虽然它绘制了我需要的行,但它并没有消除内部线条并使它看起来更糟。

关于可能导致这种情况的想法?

编辑:根据要求添加下表的全部代码。

<!--Enterprise Codes Section Start -->
<div class='tabbertab <%=strEnterprise%>' title='Enterprise Codes' id='mytab1'>
<div>
<table border="0" cellpadding="0" cellspacing="0"  class='SectionTable' width='700'>
<tr valign=top>
<td>
<table border="0" cellpadding="0" cellspacing="0" width='150'>
    <tr>
          <td class='aaa'>People</td>
    </tr>
    <% for i = 0 to UBound(peopleArray)%> 
        <tr>
            <td class='nograph'><A href='<%=peopleArray(i).link%>'><%=peopleArray(i).title%></a></td>
        </tr>
    <%next%> 
    </table>    
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" width='150'>
<tr>
      <td class='aaa'>Organization</td>
</tr>
 <% for i = 0 to UBound(orgArray)%> 
    <tr>
        <td class='nograph'><A href='<%=orgArray(i).link%>'><%=orgArray(i).title%></a></td>
    </tr>
<%next%> 
</table>    
</td>
<td>
    <table border="0" cellpadding="0" cellspacing="0" width='150'>
        <tr>
            <td class='aaa'>Skills</td>
        </tr>
        <% for i = 0 to UBound(skillsArray)%> 
            <tr>
                <td class='nograph'><A href='<%=skillsArray(i).link%>'><%=skillsArray(i).title%></a></td>
            </tr>
        <%next%>
    </table>    
</td>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width='250'>
        <tr>
            <td class='aaa'>Communications</td>
        </tr>
        <% for i = 0 to UBound(commArray)%> 
            <tr>
                <td class='nograph'><A href='<%=commArray(i).link%>'><%=commArray(i).title%></a></td>
            </tr>
        <%next%>
        <td class='aaa'>Other</td>
        </tr>
        <% for i = 0 to UBound(otherArray)%> 
            <tr>
                <td class='nograph'><A href='<%=otherArray(i).link%>'><%=otherArray(i).title%></a></td>
            </tr>
        <%next%>
            <%strSql = "Select NVL(CL_USER_DEFINED_HELP_FLD, 'N') CL_USER_DEFINED_HELP_FLD from client_tbl WHERE CL_CLIENT_ID_FLD = " & CLIENT_ID 
            Set adoConnection = Server.CreateObject("ADODB.Connection")
            Set rsClient = server.CreateObject("ADODB.RecordSet")

            adoConnection.Open dsn_connection
            rsClient.Open strsql, adoconnection

            if rsClient("CL_USER_DEFINED_HELP_FLD") = "Y" then
                userHelpText = "Disable "
                toggleUserHelp = "N"
            else
                userHelpText = "Enable "
                toggleUserHelp = "Y"
            end if

            rsclient.Close()
            adoconnection.Close()
            %>
            <% if ADMIN = "Y" then %>
                <tr>
                    <td class='nograph'><A href='Maintenance/toggle_user_help.asp?toggleMode=<%=toggleUserHelp %>'><%=userHelpText %>User Defined Help</A></td>
                </tr>
            <% end if%> 
    </table>    
</td>
</tr>
</table>
</div> 
</div>

SectionTable的.css代码

 TABLE.SectionTable
 {
BORDER-RIGHT: #a3cce6 1px;
BORDER-TOP: #a3cce6 1px solid;
BORDER-LEFT: #a3cce6 1px solid;
BORDER-BOTTOM: #a3cce6 1px solid;
 }

1 个答案:

答案 0 :(得分:0)

如果您尝试在此处使用CSS,则这就是您的css文件的外观。

table, tr, td, {
    border-collapse: collapse;
}

这会合并table,tr和td标签的所有边框..

默认情况下......所有这些之间都有一点差距。 试试这个......

TABLE.SectionTable, TABLE.SectionTable > tr, TABLE.SectionTable > tr > td
{
  border-collapse: collapse;
}