Solved

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

Posted on 2003-11-26
6
245 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
clickable swap image 5 295
certificate 4 162
Good way to create an array in Adobe Illustrator CC 2014 .1.1 1 730
VCD to mp4 11 156
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…
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.

785 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