问题与AutoCompleteExtender渲染 [英] Issue with AutoCompleteExtender rendering

查看:153
本文介绍了问题与AutoCompleteExtender渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AutoCompleteExtender在我的应用程序,并以某种方式意见箱开始向右下的文本框中没有出现,但低于20-30,而像素。通过生成的HTML挖后,我发现它呈现为UL和李元素,同时从ASP.NET下载的样本中它呈现为内部DIV DIV和正常工作。

I am using AutoCompleteExtender in my application and somehow the the suggestion box started appearing not right under the text box but rather 20-30 pixels below. After digging through the generated HTML i noticed that it renders as UL and LI elements, while in the samples downloaded from ASP.NET it renders as DIV inside DIV and works fine.

我想不出什么使它呈现不同。我要如何正确的文本框下显示的建议列表?

I can't figure out what makes it render differently. How do i display the suggestion list right under the textbox?

这是它会在IE罚款的方式,这个问题只存在于Firefox浏览器。

By the way it looks fine in IE, the issue exists only in firefox.

推荐答案

您打算与你的CSS玩。默认值(从样品)是:

You're going to have to play with your CSS. The default (from the sample) is:

visibility : hidden;
margin : 0px !important;
background-color : #f0f0f0;
color : windowtext;
border : buttonshadow;
border-width : 1px;
border-style : solid;
cursor : 'default';
overflow : auto;
height : 200px;
text-align : left; 
list-style-type : none;

我说我的网站,例如之一:

I added on one of my sites for example:

.autocomplete_completionListElement li
{  
    margin : 0px !important;
    padding: 2px;
}

但你要使用像萤火虫以图什么规则,你已经被越来越适用于它了你不想要的。请记住,CSS =的层叠的样式表,所以父元素或规则可以影响库元素是这样的。

But you'll want to use something like Firebug to figure what rule you have that is getting applied to it that you don't want to be. Remember, CSS = Cascading style sheets, so parent elements or rules can affect library elements like this.

这篇关于问题与AutoCompleteExtender渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆