AjaxControlToolkit,ComboBox样式 [英] AjaxControlToolkit, ComboBox style

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

问题描述

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

I am with a little problem with the arrow image of a ComboBox control (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;
}

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

I set this style on combobox, but the control are showing the border of the textbox before the arrow:

查看这里,边框不显示!

如何隐藏此边框? / p>

How can I hide this border?

推荐答案

这对我来说工作正常,我在我的页头有以下css(虽然它可以去任何地方, stylesheet当然)

This is working fine for me, I have the following css in my page head (though it can go anywhere else like in a stylesheet of course)

<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>

<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>

也许你有一些冲突的造型?你试过一个简单的页面,除了你需要什么,才能生成组合框?

Perhaps you have some conflicting styling? Have you tried a simple page with nothing but what you require to generate the combobox?

这篇关于AjaxControlToolkit,ComboBox样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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