去除div重影的几条线

.bodyCss{
    color: #00315f;
    font-size: 14px;
}
.btnonePadding{
    padding: 0px;
    background-color: white;
}
.detailtb{
    text-align: center;
    height: 84px;
    line-height: 84px;
}

.dhRight{
    text-align: center;
    padding-right: 10px;
    height: 55px;
    line-height: 60px;
    border:#cadaa9;
    /* color: #6b7e8a;  */
}

.projectName{
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #1d71b7;
    background-color: white;
}

.borderLeBs{
    border-left: 1px solid #d8d9dc;
}
.borderBtBs{
    border-bottom: 1px solid #d8d9dc;
}
.paddingLeft{
    padding-left: 10px;
    height: 55px;
    line-height: 60px;
    /* color: #6b7e8a; */
}
.shortIntroduce{
    height: 200px;
    line-height: 200px;
}

.tooLength {
  overflow:hidden;
  text-overflow:ellipsis;
  -o-text-overflow:ellipsis;
  -webkit-text-overflow:ellipsis;
  -moz-text-overflow:ellipsis;
  white-space:nowrap;
}
#pro_title{
/* position:static;
display: block;
position: fixed;z-index:999; */
}
#tb_ctx{
    z-index: 2;
}
.proj_titile{
display:block;
float: left;
position: absolute;
 
background-color: white;
margin-top: 0px;
border-color: #cadaa9;

}
#pro-t1,#pro-t2,#pro-t3,#pro-t,#pro-t4{
    word-wrap:break-all;
    word-break:break-all;
     white-space:normal;
     line-height: 20px; 
     text-align: center;
     vertical-align:middle;
     align-items:center;
     max-height: 100%;
     border-color: #d8d9dc;
     clear:both;
}
#pro-t5,#pro-t6,#pro-t7,#pro-t8{
     border-color: #d8d9dc;
     clear:both;
}
/* tr td{border:1px solid #d8d9dc;clear:both;} */
#proDesc{border:1px solid #d8d9dc;clear:both;}
.dhRight borderBtBs{border:1px solid #d8d9dc;border-bottom-color: #d8d9dc;}
<body class="bodyCss">
    <div class="ca_bg clearfix full-container" style="padding-top:0px;">
        <jsp:include page="../../views/include/includeNav.jsp">
            <jsp:param name="nav" value="ALLSY"/>
        </jsp:include>
        
        <form action="/lgip/all/initial/index" id="queryForm" class="form-horizontal" method="post">
        <div class="container minBg ">
            <div class="col-xs-12 ft14" style="height: 26px;padding-top: 4px;padding-left: 30px;padding-right: 0px;z-index: 5;width: 975px;background: white;" >项目库&gt;项目信息对比</div>
            
            
            <div class="col-xs-12 " style="padding: 0px;">
            
            <table class="proj_titile" style="margin-left:0px;">
            <tr>
                <td style="border:1px solid #d8d9dc;">
                    <div class="col-xs-2 btnonePadding top-fix-container" style="width: 80px;margin-left: 0px;">
                            <div class="detailtb borderBtBs" style="height: 80px;"><img alt="对比" src="../../../resource/images/lgip/cmpbz.png"></div>
                            <div class='dhRight borderBtBs' style="height: 65px;">行业</div>
                            <div class='dhRight borderBtBs' style="height: 80px;">地区</div>
                            <div class='dhRight borderBtBs'>项目编号</div>
                            <div class='dhRight borderBtBs'>单位名称</div>
                            <div class='dhRight borderBtBs'>融资额度</div>
                            <div class='dhRight borderBtBs'>合作方式</div>
                            <div class='dhRight borderBtBs' style="height: 45px;">开始日期</div>
                            <div class='dhRight borderBtBs' style="height: 45px;">截止日期</div>
                            <div class='dhRight ' style="min-height: ${lengthx/11*20}px;">简介</div>
                    </div>
                </td>
            </tr>
                            
            </table>
            
            
            <div style="width:900px;white-space:nowrap;margin-left: 70px;">
            
            <table id="tb_ctx" style="margin-top: 0px;">
                <tbody>
                    <tr height="0px"><td></td></tr>
                    <tr valign="middle">
                        
                        
                        <c:if test="${not empty pagelist}">
                        
                            <c:choose>
                            <c:when test="${num > 0 }">
                                <c:forEach items="${pagelist}" var="item">
                                <td style="border:1px solid #d8d9dc;"> 
                                <div class="col-xs-4 borderLeBs btnonePadding" style="width: 180px;">
                                <div  style="height: 80px;border-bottom-color: #d8d9dc;" class="borderBtBs">
                                    <div id="pro-t" style="padding-top: 18px;" class="projectName paddingLeft tooLength" ><a  title="${item.proName}" href="/lgip/all/details/allocated?menuIcon=A&id=${item.id}">${item.proName}</a></div>
                                 
                                </div>
                            <div id="pro-t1" style="color: #1d71b7;height: 65px;padding-top: 18px;" class='paddingLeft borderBtBs'>${item.proType}</div>
                            <div id="pro-t2" style="color: #1d71b7;height: 80px;padding-top: 20px;" class='paddingLeft borderBtBs'>${item.proArea}</div>
                            <div  style="color: #1d71b7;border-bottom-color: #d8d9dc;" class='paddingLeft borderBtBs'>${item.proNo}</div>
                     

                            <div  id="pro-t3" class='paddingLeft borderBtBs' style="padding-top: 16px;" >${item.firmName}</div>
                            <div  class='paddingLeft borderBtBs' style="text-align: center;border-bottom-color: #d8d9dc;">${item.showAmount}&nbsp;
                            </div>
                            <div  id="pro-t4" class='paddingLeft borderBtBs' style="text-align: center;padding-top: 10px;">
                                ${item.cooperateName}
                     
                            </div>
                            <div  id="pro-t5" class='paddingLeft borderBtBs' style="text-align: center;height: 45px;">${item.showStartTime}</div>
                            <div id="pro-t6" class='paddingLeft borderBtBs' style="text-align: center;height: 45px;">${item.showEndTime}</div>
                            <div id="pro-t7" style="word-wrap:break-all;word-break:break-all; width: 179px;max-width: 180px;white-space:normal;line-height: 20px;text-align:left;padding-top: 10px;min-height: ${lengthx/11*20}px;" class='paddingLeft borderBtBs'>
                                ${item.proDesc}</div>
                        </div>
                                
                                </td>
                                </c:forEach>
                            </c:when>
                            <c:otherwise> </c:otherwise>
                            </c:choose>
                            </c:if>
                        
                    </tr>
                </tbody>
            </table>
            </div>
             
                
            </div>
            
        </div>      

图片描述

阅读 4.3k
5 个回答

给table加上样式border-collapse:collapse

中间的div只能左右边框只设置一个了。
不如给你的左侧栏设置左右边框。填数据的只设置右边框好了。。

既然用了jsp,何不用table布局好了
如果是div的话,你只能设置一边的边框,不然会重合,或者,你可以用jquery把偶数项的左边框设为0px

最简单的方法,用outline替代border

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题