2014-06-16 33 views
0

我在Grid View內部使用combo-box控件。 我想描述清楚的問題爲什麼ComboBox會在表上添加一個top屬性?

我的HTML代碼:

<AJAX:ComboBox ID="ddlContactName1" runat="server" 
     AutoPostBack="true" Width="190px" 
     OnSelectedIndexChanged="ddlContactName_SelectIndexChanged" 
     DropDownStyle="DropDownList" Enabled="false" CssClass="WindowsStyle"    AutoCompleteMode="Suggest"> 
</AJAX:ComboBox> 

代碼通過ASP在瀏覽器中生成:

<td class="td_search_box"> 
<div id="ctl00_MainContent_grdContacts_ctl02_ddlContactType1" class="acb" style="display: inline-block;"> 
     <table id="ctl00_MainContent_grdContacts_ctl02_ddlContactType1_Table" class="ajax__combobox_inputcontainer" cellspacing="0" cellpadding="0" border="0" 
    style="border-style: none; border-width: 0px; border-collapse: collapse; 
     display: inline-block; position: relative; top: 5px;"> 

........... 

組合框(ddlContactType1)呈現爲DIV和表內。表具有類和樣式。樣式具有屬性「top:5px;」從頂部引起填充。

因此,組合框從頂部移動5個像素並位於表格網格線之上。我想製作top:0px;。如何做到這一點?

任何人都可以有任何想法嗎?

Thnaks提前

回答

-1

我得到了solution.And希望這將幫助別人,

<style type="text/css"> 
.ajax__combobox_inputcontainer 
    { 
     top:0px !important; 
    } 

</style 
相關問題