By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,781 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,781 IT Pros & Developers. It's quick & easy.

cssText read only in Moz?

P: n/a
In IE you can change a stylesheet rule:

rule_reference.style.cssText='color: blue';

but the Moz equivalent appears to be read only, or am I doing this wrong?:

rule_reference.cssText='span { color: red }';

Perhaps I should just add a new rule.

Jeff
Jan 16 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 16 Gen, 09:55, Jeff <jeff@spam_me_not.comwrote:
* *In IE you can change a stylesheet rule:

* rule_reference.style.cssText='color: blue';

* but the Moz equivalent appears to be read only, or am I doing this wrong?:

* *rule_reference.cssText='span { color: red }';

* *Perhaps I should just add a new rule.

* *Jeff
if you want change the whole rule than you must
do it from its parent stylesheet by deleteRule/insertRule (there is
not a modyfyRule)

However I think that this is a brute-force manner to modify a
stylesheet. May be for run-time/temporary modification it should
be better to use the style property...

Regards
Jan 16 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.