在ItemTemplate中的一行上忽略CSS样式

时间:2017-11-02 23:51:30

标签: css asp.net formview

我的布局在Visual Studio中看起来很棒,直到我单击Start而不调试,此时我的ItemTemplate中我的表格的一行中的样式将被忽略。所有其他9行看起来都很棒,PagerTemplate也是如此。有任何想法吗?谢谢!

<asp:Table CssClass="fvFooter" ID="EditButton" runat="server">
  <asp:TableCell CssClass="editButtonsRow">
  <asp:Button ID="btnEdit" CssClass="btnEdits" runat="server" Text="Edit" CausesValidation="false" CommandName="Edit" />
  <asp:Button ID="btnAdd" CssClass="btnEdits" runat="server" Text="Add" CausesValidation="false" CommandName="Add" />                           
  <asp:Button ID="btnRemove" CssClass="btnEdits" runat="server" Text="Remove" CausesValidation="false" CommandName="Remove" />

以下是样式

.fvFooter {
background-color: #F0F0F0;
height: 3em;
margin-bottom: 0px;
margin-left: 2px;
margin-top: .25em;
width: 55.75em;
}
.editButtonsRow {
background-color: #F0F0F0;   
margin-left: 2px;
margin-top: .25em;
padding-bottom: .5em;
padding-left: 41em;
padding-top: .5em;
width: 14.75em;
}
.btnEdits {
float: left;
font-weight: bold;    
margin-left: .5em;
width: 5em;
}

以下是生成的HTML

<table id="DetailContentPlaceHolder_fvQuickView_EditButton" class="fvFooter">
  <tr id="DetailContentPlaceHolder_fvQuickView_TableRow10">
    <td class="editButtonsRow">
      <input type="submit" name="ctl00$DetailContentPlaceHolder$fvQuickView$Button1" value="Edit" id="DetailContentPlaceHolder_fvQuickView_Button1" class="btnEdits" />
      <input type="submit" name="ctl00$DetailContentPlaceHolder$fvQuickView$Button2" value="Add" id="DetailContentPlaceHolder_fvQuickView_Button2" class="btnEdits" />
      <input type="submit" name="ctl00$DetailContentPlaceHolder$fvQuickView$Button3" value="Remove" id="DetailContentPlaceHolder_fvQuickView_Button3" class="btnEdits" />
    </td>
  </tr>

0 个答案:

没有答案