To edit this value just use
element.style.marginTop = "10px";
If you have only one *section* element with *itemscope* attribute set to
*itemscope*, you can find it using this code:
document.querySelector(*"**section*[*itemscope*=*itemscope*]");
So your one-liner would be:
document.querySelector("section[itemscope=itemscope]").style.marginTop =
"10px";
W dniu sobota, 19 września 2015 14:16:08 UTC+2 użytkownik Ben napisał:
>
> Assume I have a webpage with the following HTML code:
>
> <section itemscope="itemscope".... style="margin-top: 20px;">
> ....
> </section>
>
>
> How can I overwrite the "margin-top" inline style value by e.g. 10 ?
>
> Aftwerwards the following statement should become effective:
>
> <section itemscope="itemscope".... style="margin-top: 10px;">
>
> If necessary jQuery can be used.
>
> Thank you
> Ben
>
>
>
--
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/d/optout.