Gray1989;1214448 wrote:element.className = "class1 class2 class3";
This should work, no?
No, I mean creating the whole CSS class itself using Javascript
for example:
.font_1 {
font-family: Arial;
font-size:20pt;
}
.font_2 {
font-family: Arial;
font-size:25pt;
}
I get all this information from a file and I want to create the corresponding CSS class dynamically using Javascript in order to assign it to any HTML element using the class attribute.