Solved

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

Posted on 2003-11-26
6
249 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
D3, SVG, dragging 3 159
Exdpanding a PNG image 15 76
Simple 3D CAD 18 122
Any free software for printscreens 7 102
Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
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…
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …

730 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