0
我目前正在從基於表格的佈局改爲使用div佈局。我正在努力與CSS。即使加載了css文件,我的樣式似乎也沒有得到應用。我究竟做錯了什麼?Div CSS未應用於佈局。我爲什麼做錯了?
.CategoryHeader
{
font-family: Verdana;
font-size: 10pt;
color: #2151b1;
text-align: left;
padding-bottom:3px;
padding-top:3px;
}
.CriteriaHeader {
font-family: Verdana;
font-size: 10pt;
text-align: left;
padding-bottom:3px;
padding-top:3px;
}
.divTable {
display: table;
border: none;
width:100%;
}
.divTR {
display: table-row;
width: 100%;
}
.divTD {
display: table-cell;
margin-bottom:22px;
}
<div class="divTable">
<div class="divTR">
<div class="divTD">
<LABEL class="CriteriaHeader">Number</LABEL>
</div>
</div>
<div class="divTR">
<div class="divTD">
<asp:TextBox id="txtNumber" runat="server" CssClass="Textbox" ToolTip="Enter Number to search"></asp:TextBox>
</div>
</div>
<div class="divTR">
<div class="divTD">
<LABEL class="CriteriaHeader">Description</LABEL>
</div>
</div>
<div class="divTR">
<ajaxToolkit:ListSearchExtender ID="cboDesc_ListSearchExtender" runat="server"
Enabled="True" TargetControlID="cboDesc" PromptCssClass="ListSearch">
</ajaxToolkit:ListSearchExtender>
<div class="divTD">
<asp:DropDownList id="cboDesc" runat="server" CssClass="DropDownList" ToolTip="Choose description to search"></asp:DropDownList>
</div>
</div>
</div>
<div>
<asp:Button id="btnSearch" runat="server" Text="Submit" CssClass="Button"></asp:Button>
<asp:Button id="btnClear" runat="server" Text="Clear" CssClass="Button"></asp:Button>
</div>
你能說哪些屬性沒有被應用? – dabadaba
發佈呈現的HTML並創建一個jsFiddle – j08691
請將鏈接發佈到您的css文件中 – troseman