PDA

View Full Version : Depressible DHTML buttons



nmmorgan
02-14-2007, 07:11 PM
1) Depressible DHTML buttons

2) http://www.dynamicdrive.com/dynamicindex5/depressbutton.htm

3) Describe problem: The button is picking up the background color from the user's Windows properties...as is the border of the table...how can I customize this so that I force a specific color? Thanks...

jscheuer1
02-14-2007, 10:34 PM
Give the button a background color of its own.

nmmorgan
02-15-2007, 02:11 PM
I'm not sure where in the code to do that...

nmmorgan
02-15-2007, 02:12 PM
I'm not sure where in the code to do that... ??

boxxertrumps
02-15-2007, 02:22 PM
background-color is the css attribute you should use.
look in your css for a selector that matches the buttons.
so you would have

.coolBar {background-color:#hexcode;}

in your CSS file, replacing "#hexcode" with the color of your choice.

nmmorgan
02-15-2007, 03:59 PM
something in the .js file is still overriding the colors...:confused:

jscheuer1
02-15-2007, 04:35 PM
something in the .js file is still overriding the colors...:confused:

That's right, the .coolBar and .coolButton class backgrounds are off limits. This is probably required so that the script can work properly. This script is only intended for IE by the way so, if you are not using that browser, unexpected things may happen. Also, the buttons are gray, period. There appears to be no other color available.

Now, I just tried this out locally here and it worked fine in IE, OK (only some of the effects worked) in Opera and degraded well (did nothing but did it gracefully with the links still able to be seen and used) in FF. Perhaps a link to your problem page would help us figure out your problem.