AjaxControlToolkit,ComboBox 风格

Fab*_*bio 1 css asp.net combobox ajaxcontroltoolkit

我对 ComboBox 控件 (AjaxControlToolkit) 的箭头图像有一点问题。

我定义了这种风格:

.WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button
{
    margin: 0;
    padding: 0;
    background-image: url(../icons/windows-arrow.gif);
    background-position: top left;
    border: 0px none;
    height: 21px;
    width: 21px;
}
Run Code Online (Sandbox Code Playgroud)

我在组合框上设置了这种样式,但是控件在箭头之前显示了文本框的边框:

http://img190.imageshack.us/img190/9830/combobox.png)

这里,边框没有显示!

如何隐藏此边框?

Dav*_*all 5

这对我来说很好用,我的页面头部有以下 css(尽管它当然可以放在样式表中的任何其他地方)

<style type="text/css">
    .WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer input
    {
        margin: 0;
        border: solid 1px #7F9DB9;
        border-right: 0px none;
        padding: 1px 0px 0px 5px;
        font-size: 13px;
        height: 18px;
        position: relative;       
    }
    .WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button
    {
        margin: 0;
        padding: 0;
        background-image: url(windows-arrow.gif);
        background-position: top left;
        border: 0px none;
        height: 21px;
        width: 21px;
    }
    .WindowsStyle .ajax__combobox_itemlist
    {
        border-color: #7F9DB9;
    }
</style>
Run Code Online (Sandbox Code Playgroud)

然后我在我的页面正文中有这个控件标记:

<ajaxToolkit:ComboBox ID="ComboBox1" runat="server" CssClass="WindowsStyle">
<asp:ListItem Text="[Select an item]" Value="" />
<asp:ListItem Text="Actual Item #1" Value="SomeValue" />
<asp:ListItem Text="Actual Item #2" Value="3" />
<asp:ListItem Text="Actual Item #3" Value="xxx" />
</ajaxToolkit:ComboBox>
Run Code Online (Sandbox Code Playgroud)

也许你有一些相互冲突的风格?您是否尝试过一个简单的页面,除了生成组合框所需的内容之外什么都没有?