我对一个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样式
发布评论