Your CSS rule appears to be getting overrode by a built-in rule that exists in the default style. Fighting CSS rules with inline styling can be a little frustrating. I would suggest that we edit the HTML to apply classes to the table cells instead:
topRowHtml += '<td class="header_color1"><center><font size="3"><b>Offering ' + i + '</b></font></center></td>';
topRowHtml += '<td class="header_color2"><center><font size="3"><b>Offering ' + i + '</b></font></center></td>';
Then we can follow up this JavaScript with a CSS block to apply the background colors:
<style>
td.header_color1 {
background-color: #E0E0E0;
}
td.header_color2 {
background-color: #C3C3C3;
}
</style>