Posted on: 5/16/2014 1:45:10 PM | Views : 281

I have an addRule method to add a new style rule into the current style sheet  of a .Net page.
document.styleSheets[0].addRule("." + sDisplayClass + "","font-size:9px;") // works in IE but not in firefox ( may be because of the addRule method) //JavascriptCan I change it to use insertrule like this below.It is not giving error in FF document.styleSheets[0].insertRule( "*{'.' + sDisplayClass + ';font-size:9px;}",0) But not sure the syntax is correct, because if I change the font size to 19 from 9, it is not making any changes. document.styleSheets[0].insertRule( "*{'.' + sDisplayClass + ';font-size:19px;}",0) Thanks.

Go to the complete details ...