Change the BG color and override CSS

Discussion in 'JavaScript' started by 1-3-3-7, Dec 14, 2008.

  1. #1
    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 and using an id instead of a class in my CSS for that particular attribute I was able to get the button to work.
     
    1-3-3-7, Dec 14, 2008 IP