Am 03.02.2013 09:09, schrieb Ben:
Ok, thank you for all the answers.
One more question:
All the mentioned "width" attributes are but into the HTML by the website
developers not by me.
If I apply now my own GM script with CSS defintions onto such a website:
will my new CSS statements overwrite not only the original CSS definitions
but also the HTML attributes?
In other words: Can CSS defintions only change other CSS definitions or
HTML code as well?
Ben
The GM CSS usually overrides the HTML width attributes, I'm not sure
about the CSS. Maybe it does because GM_setStyle appends the style to
the page's source code, and the last defined rule overrides the previous
ones, if they have the same selector. In any case you can force-override
the style by appending "!important":
table {
width: 90% !important;
}
Note that in this case all three statements need that appendix, because
!important can only be overridden by other !important rules.
N. B.: If the only benefit of your script is to apply custom CSS, you'll
likely be better off with the add-on "Stylish", which is somewhat a
Greasemonkey for CSS. It also supports on-the-fly enabling and disabling
of styles, a preview when in edit mode and CSS syntax highlighting - all
without reloading the page.
Chris
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.