How to override CSS stylesheet
I have a table: <table border = 1> <tr> <td bgcolor = #80ffff>Day of the week</td> <td class = monday>Monday</td> <td class = tuesday>Tuesday</td> <td class = wednesday>Wednesday</td> <td class = thursday>Thursday</td> <td class = friday>Friday</td> <td class = saturday>Saturday</td> <td class = sunday>Sunday</td> </tr> </table> with javascript: var date = new Date(); var day = date.getDay(); if (day == 1){ day = "monday"; } else if (day == 2){ day = "tuesday"; } else if (day == 3){ day = "wednesday"; } else if (day == 4){ day = "thursday"; } else if (day == 5){ day = "friday"; } else if (day == 6){ day = "saturday"; } else if (day == 7){ day = "sunday"; } columns = document.getElementsByClassName(day); for (var i = 0; i < columns.length; i++){ columns[i].bgColor = "#99ddff"; } and it worked fine, but now I've added the CSS and the JavaScript seems unable to override the CSS: .monday{ background: #e6ffff; } .tuesday{ background: #e6ffff; } .wednesday{ background: #e6ffff; } .thursday{ background: #e6ffff; } .friday{ background: #e6ffff; } .saturday{ background: #e6ffff; } .sunday{ background: #e6ffff; }