2013-08-12 27 views
1

我在一個asp.net應用程序中使用了AutoCompleteExtender,並且我想將max-height設置爲CompletionListCssClass,因爲我在75-150左右得到了很多記錄。我的問題是,即使在AutoCompleteExtender上有三個recods,它需要150px。我想動態改變高度。有沒有特定的CSS屬性來做到這一點。任何幫助將不勝感激。謝謝ASP.NET AutoCompleteExtender CompletionListCssClass

 
    .autocomplete_completionListElement 
    { 
    margin : 0px!important; 
    background-color : White; 
    color : windowtext; 
    border : buttonshadow; 
    border-width : 1px; 
    border-style : solid; 
    cursor : 'default'; 
    overflow : auto; 
    font-family:Calibri; 
    font-size:12px; 
    text-align : left; 
    list-style-type : none; 
    margin-left:0px; 
    padding-left:0px; 
    max-height:150px; 
    width:auto; 
    } 

+0

你的CSS看起來確定..沒有錯。可能你應該看看填充列表的內部元素。 – vendettamit

+0

我會檢查它,並感謝您的幫助 – Damith

回答

0

添加min-height:50px或根據您對CSS的要求設置最小高度。

+0

沒有工作!。Anyway謝謝你的建議。當我將它應用於風格時,即使我有更多元素,它仍將保留在50px區域中。 – Damith