AjaxControlToolkit,ComboBox样式

编程入门 行业动态 更新时间:2024-10-14 00:26:04
本文介绍了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样式

本文发布于:2023-11-24 23:48:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627411.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样式   AjaxControlToolkit   ComboBox

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!