locbtran — 2011-03-03T20:16:15-05:00 — #1
I am able to incorporate CSS into the HTML, like this:
document.writeln("<tr><td [B]style="background-color:#FFFF00;"[/B]>" + "test" + "</td></tr>");
ralphm — 2011-03-04T00:00:11-05:00 — #2
document.write("<tr><td style='background-color:#FFFF00;'>" + "test" + "</td></tr>")
felgall — 2011-03-04T00:55:04-05:00 — #3
You shouldn't really be using document.write since it is far less flexible than any of the alternatives (such as using innerHTML or DOM calls).
Also it would probably be better if you had that CSS in a separate file allocated to a class and then just added the class to the <td>
atsea_webdesign — 2011-03-04T11:35:09-05:00 — #4
you can add a class via the DOM.
document.getElementById("blah").className = "cssclass";
So if you had your style created in your css stylesheet and wanted to apply a style to that table cell, add a class to the td using the corresponding ID.