It will only change the background color, but not the border and the drop down color
Main Topics
Browse All TopicsHi,
I need to put in some combo box in my ASP.NET page
<asp:DropDownList ID="DropDownPrefix" runat="server" TabIndex="4">
<asp:ListItem Value="0">Select One...</asp:ListItem>
<asp:ListItem>Mr.</asp:Lis
<asp:ListItem>Mrs.</asp:Li
<asp:ListItem>Miss.</asp:L
</asp:DropDownList>
By feualt, it will show in blue border theme. May I know how can I use CSS to change the color theme?
Let say, change the border to #666666
Thanks in advance
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
And if you want to find out more css, have a look at these properties.
http://www.blooberry.com/i
and here's some way to include your css
http://www.webstartcenter.
and if you change the css to
select
{
..
}
it will
Business Accounts
Answer for Membership
by: UnexplainedWaysPosted on 2007-09-01 at 23:53:53ID: 19816306
Here's a simple way to change the css for the dropdown. I've also included a div to see if the css has worked. You can change the border of the div but it doesn't change in the select.
tItem> stItem> istItem>
<style>
.someCss
{
background-color:red;
border:solid 1px red;/*#666666;*/
color:#666666;
}
</style>
<div style="width:100px; height:100px; margin-bottom:10px;" class="someCss">
some text
</div>
<asp:DropDownList ID="DropDownPrefix" runat="server" TabIndex="4" CssClass="someCss">
<asp:ListItem Value="0">Select One...</asp:ListItem>
<asp:ListItem>Mr.</asp:Lis
<asp:ListItem>Mrs.</asp:Li
<asp:ListItem>Miss.</asp:L
</asp:DropDownList>