Find jobs - Hiperidrose - Debt Consolidation - Find jobs - Florida Property

PDA

View Full Version : Change the BG color and override CSS


1-3-3-7
Dec 14th 2008, 9:41 pm
I've found several JS codes to change the page's background color, however they don't work when a background color has already been defined via CSS.

What code can I use to create a button that will change the background color and still keep the CSS attribute, the reason for doing this is that the color I choose looks good but some people might have a hard time reading it, so they might want a white background instead.

Thanks,

*EDIT* I found a solution, by using the code found HERE (http://programming.top54u.com/post/Javascript-Change-Background-Color-Style.aspx) and using an id instead of a class in my CSS for that particular attribute I was able to get the button to work.