I had problems with your solution. It seems to be #an id selector, not a class ... etc.
You can modify the file userChrome.cssin <userprofile>/chrome/userChome.css. Check the location of your directories with about:profiles.
userChrome.css:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
image#pageActionButton {display:none !important;}
image.urlbar-page-action {display:none !important;}
Firefox 57.0, , " ", (, ).