On 05/26/10 10:37, Richard Zidlicky wrote:
My only idea is that the problem is that the DOM is loaded which
triggers the script and some miliseconds later some CSS is loaded ..
However I am not sure how to verfiy that this is indeed the problem?
.. Assuming this would be the problem is it possible to add some kind
of event listener that would rerun the script after some CSS has been
loaded? Which event listener?

If this is the problem, the way to verify would be to fix it and see if it works, because the fix is easy. Search for css "specificity" -- you want to make your rules more specific than any other rule that might override it.

Setting the style attribute is _almost_ the most specific thing you can do. The only more specific is the "!important" declaration:
http://www.w3.org/TR/CSS21/cascade.html#important-rules

Your problem might really be that you're assigning to the javascript style property, and then after your script runs, another does and overwrites that value. If that is what's happening, you'll need to rethink your methodology.

--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to