I try to add a class to a td-element using javascript with the internet explorer 8 in quirks-mode. That seems to work, because I can see the added class when I view the source, but my css doens't affect it so nothing visually changes at all. I simply add a html class to change the background-color but nothing happens. It works when running in IEs normal mode, but that's not an option because I can't change the site and it's running in quirks-mode.
EDIT:
Here is a simple example:
<html>
<head>
<style>
.style1 { background-color: #ff0000; }
.style2 { background-color: #00ff00; }
</style>
</head>
<body>
<table id="table1">
<tr>
<td>some text</td>
<td>goes on</td>
<td>and on</td>
</tr>
</table>
<script type="text/javascript">
var tableElement = document.getElementById("table1");
tableElement.setAttribute("class", "style1");
</script>
</body>
</html>
Note that it doesn't work in quirks-mode (tested with IE 8) although the class is getting added (can be viewed with IE developer tools)