Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Disabled Button Background Color 1

Status
Not open for further replies.

QuantumDoja

Programmer
Jun 11, 2004
76
GB
Hi, I have a radio button that is disabled, how do I go about changing the background color of the radio button, becuase it is disabled???

Many Thanks


 
Couldn't you set it to enabled, change the color, then disable it again?

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
AFAIK there is no general pattern between browsers. IE paints bounding box, Opera circle "inside" radio element, Firefox nothing.

Otherwise this is theoretically possible with CSS3 attribute selector (works in O/FF but not consistently on all elements):
Code:
<style type="text/css">
input[disabled]
{	background-color: #c0c062;
}
</style>
Otherwise #2 (aka: IE) this requires javascript or something similar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top