Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Color for <select> and <input type=text>

Posted on 2003-11-26
6
248 Views
Last Modified: 2010-04-06
<select> and <input type=text> would draw their buttons with Windows button color whatever the style of my web page. The same is true for <select> scrollbar and borders. <input type=radio> and <input type=checkbox> have Windows background color and border color, too.
Is there any trick to change that? The solution should work for IE, I don't care about other browsers.
0
Comment
Question by:Vihmapuu
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:Vihmapuu
ID: 9824109
Oops, please replace <input type=text> with <input type=file>. Text box shows the styles OK but the file upload input has a button that does not honor my styles. Sorry for that.
0
 
LVL 15

Expert Comment

by:Timbo87
ID: 9829171
This example shows how to change the background and border color of a select and file input. It also shows how to change the background color of a radio button and checkbox. Radio buttons and checkboxes cannot change border colors and you cannot customize the actual button of the file input.

<html>
<head>
<style type=text/css>
.redbg {background: red; border-color:green;}
</style>
</head>
<body>
Select
<br>
<select class=redbg>
<option>Option 1
<option>Option 2
<option>Option 3
<option>Option 4
<option>Option 5
</select>
<br>
<br>
Checkbox
<br>
<input type=checkbox class=redbg>
<br>
<br>
Radio Button
<br>
<input type=radio name=radio1 value="1" class=redbg>
<br>
<br>
File Input
<br>
<input type=file class=redbg
</body>
</html>

Online version:
http://timbo87.home.comcast.net/temp/redbg.htm
0
 
LVL 1

Author Comment

by:Vihmapuu
ID: 9830269
Well, thank you but there is nothing new in what you wrote.
That's easy stuff and that is not why I offered 500 points.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 15

Expert Comment

by:Timbo87
ID: 9832419
Your question is a bit vague. The background colors are changed, per your request. Can you tell me exactly what you want?
0
 
LVL 1

Author Comment

by:Vihmapuu
ID: 9841606
I want to change
<select> scrollbar and button color
<select> border color
<input type=file> button color
<input type=radio> inside background and border color
<input type=checkbox> inside background and border color
0
 
LVL 4

Accepted Solution

by:
daluu earned 500 total points
ID: 9844225
i wonder if this can be done. probably requires some javascript or vbscript too in addition to CSS.
ASP.NET and Visual Studio might give you more control over those too, but i don't know.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
certificate 4 163
Indesign file needs voice and vary speed. 3 273
What is a good ubuntu drawing program 6 152
MS PAint how to type 14 150
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this tutorial viewers will learn how to create blended and gradiated shapes in Illustrator using the blend tool Draw two shapes, one of them in a different color: Select both and create a blend by going to Object > Blend > Make: Blends can also b…
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question