On 13.10.2013 09:17, Ben Stover wrote:
The img is the only one inside this <div> element.
GM_addStyle("div#aaa.img { height="40%",width="auto" !important; }");
or
GM_addStyle("div.aaa.img { height="40%",width="auto" !important; }");
Does not work
Three problems, none of which are Greasemonkey related:
1. .img would select a div with class "img", not an img element that's
a descendant of the div. The correct selector is div#aaa img for a div
with id aaa, or div.aaa img for a div with class aaa. See
http://www.w3.org/TR/CSS2/selector.html
2. CSS declarations are specified as name: value and separated by
semicolons, with keywords written without quotes, so
height:40%;width:auto instead of height="40%",width="auto". See
http://www.w3.org/TR/CSS2/syndata.html#declaration
3. !important only modifies the precedence of the specific declaration,
if you want to override height as important as well, you need to specify
height:40% !important;width:auto !important. See
http://www.w3.org/TR/CSS2/cascade.html#important-rules
--
Klaus Johannes Rusch
[email protected]
http://klausrusch.atmedia.net/
--
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.
For more options, visit https://groups.google.com/groups/opt_out.