Solved

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

Posted on 2003-11-26
6
240 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I've been using this technique since Adobe CS2, and it should work with any version of Illustrator that includes the appearance panel. In this tutorial we'll create a button using the appearance panel in Adobe Illustrator, and then save it as a r…
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…
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now