Link to home
Start Free TrialLog in
Avatar of Vihmapuu
Vihmapuu

asked on

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

<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.
Avatar of Vihmapuu
Vihmapuu

ASKER

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.
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
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.
Your question is a bit vague. The background colors are changed, per your request. Can you tell me exactly what you want?
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
ASKER CERTIFIED SOLUTION
Avatar of daluu
daluu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial