anyone know how to alter the style of a post comment button?

  • Unknown's avatar

    This isn’t for my site its for:
    https://mygoodmeasure.wordpress.com/fitted-furniture-sector-kent-london-news/

    I’ve styled up the Leave a comment button but not the post comment button. I’ve tried viewing the button with the inspect element tool and found the code. But whatever I do with that code, that button doesn’t alter!!

    Any ideas?!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, try using the following CSS selector and add the styling declarations you desire.
    #respond .form-submit input, #respond .form-submit input#comment-submit, #respond .comment-form-fields input[type="submit"], #respond p.form-submit input[type="submit"], #respond input[type="submit"], #commentform #submit
    Yes, it is a long one. You may have to use the !important keyword after the some of the declaration values to force them to override the existing styling, such as this:
    background: #cc0000 !important;

  • Unknown's avatar

    Hello thesacredpath, think our ‘paths’ might have crossed before!

    Thanks for the tip re: !important; – I’ve made some progress because of using that. However, the css selector has got some of those in place too and that’s overiding my code! For example, the background image and border. Is there anything else I can do?

  • Unknown's avatar

    Hmmm, if they have set !important in the original CSS for the comments section, and you can’t get it to override with Custom CSS, that means the CSS for that button is loading after the custom CSS and there wouldn’t be much we could do about it.

    Your post comment button though looks very close to what you have for the leave comment button with the exception of the background color. You need to use “background” instead of “background-color” since you have to override the background image for the button as well. Use this:
    background: #11121d !important;

  • Unknown's avatar

    Ok thanks. Have now got it sort of like my leave a comment button! I have tried changing background-color to just background for the hover state too – but no luck.

    If anything, it would be nice if the font matched my other buttons. Tinos. Are you saying I won’t be able to do that or anything else then?

  • Unknown's avatar

    You can change the hover color with the following.

    #respond .form-submit input#comment-submit:hover {
        background: #cc0000 !important;
    }

    As far as the font, I can’t get that to change.

  • Unknown's avatar

    Well thats tons better than it was. Thanks!

  • Unknown's avatar

    Super, and you are welcome.

  • The topic ‘anyone know how to alter the style of a post comment button?’ is closed to new replies.