我在一个GridView中设置了一个头部的样式:
.topview{
background-color:#E4F2FF;
height:20px;
font-size:12px;
color:#445588;
font-weight:bold;
text-align:left;
border-collapse:collapse;
empty-cells: show; 
margin:0px;
padding:0px;
}
.topview input{
border:0;
}
.topview td{
padding:5px;
padding-left:10px;
border-bottom:1px solid #ececec;
border-right:1px dotted #A5ADC4;
}
但是用的时候,其他都正常,边线与内边距却始终显示不出来,为什么?
当我用
.topview{
background-color:#E4F2FF;
height:20px;
font-size:12px;
color:#445588;
font-weight:bold;
text-align:left;
padding:5px;
padding-left:10px;
border-bottom:1px solid #ececec;
border-right:1px dotted #A5ADC4;
}
这样的样式时,内边距有了,但是边线依然显示不出来
这是什么原因?
望各位大人指教。
小女子这厢感激不尽!

解决方案 »

  1.   

    ececec这个颜色太淡了换个颜色就可以显示了
      

  2.   

    cpp2017(慕白兄) 换颜色没有用。
      

  3.   

    cpp2017(慕白兄) 
    我把它换成
    .topview{
    background-color:#E4F2FF;
    height:20px;
    font-size:12px;
    color:#445588;
    font-weight:bold;
    text-align:left;
    padding:5px;
    padding-left:10px;
    border-bottom:1px solid #000000;
    border-right:1px dotted #000000;
    }
    可是还是没有边
      

  4.   

    什么边都没有,不管是内边框,还是外边框
     整段是这样的<asp:GridView ID="GridViewSellProduct" runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="sellID" DataSourceID="SqlDataSource1" OnRowCancelingEdit="GridViewSellProduct_RowCancelingEdit" OnRowDeleting="GridViewSellProduct_RowDeleting" OnRowEditing="GridViewSellProduct_RowEditing" OnRowUpdating="GridViewSellProduct_RowUpdating" Width="100%" CellPadding="0" BorderStyle="None" CssClass="content data" GridLines="None">
                      <Headerstyle CssClass="topview"/>
      

  5.   

    不对.
    应该是 
    CssClass="topview"
      

  6.   

    tr是没有border-right 的
    另,如果你用
    Headerstyle 
    那么.topview td{
    就应该是
    .topview th
      

  7.   

    呵呵,可以了,cpp2017(慕白兄),太谢谢你了