WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp for WordPress
[resolved] Add hover state for button (6 posts)

  1. deus_073
    Member
    Posted 11 months ago #

    Hello, I managed to customize the field and button through css but I've been trying for 2 hours to add a very simple hover state for the submit button (just another color).

    I'm not at all technical so if you could please direct me where, at what line, in what file, to paste what, that'd be great!

    http://wordpress.org/plugins/mailchimp-for-wp/

  2. Danny van Kooten
    Member
    Plugin Author

    Posted 11 months ago #

    Hi there,

    Add the following CSS to your theme's style.css file.

    form.mc4wp-form input[type="submit"]:hover { background-color:red; }

    Your theme's CSS file can, in most cases, be found here: /wp-content/themes/your-theme-name/style.css.

    Good luck!

    Danny

  3. deus_073
    Member
    Posted 11 months ago #

    Cleared cache, everything is good, thank you!!

  4. Danny van Kooten
    Member
    Plugin Author

    Posted 11 months ago #

    It's working for me now, and probably for everyone using an up-to-date browser.

    If you want the styling to be compatible with old browsers, you will need to add a class attribute to the submit button so you can use this in your CSS selector.

    In your form mark-up:
    <input type="submit" class="submit" value="Sign up" />

    In your theme's style.css file:
    .mc4wp-form input.submit{ background-color:red; }

    After changing, reload the page using Ctrl + F5 to force a so-called hard refresh.

    Good luck!

    PS. I don't recommend changing the /mailchimp-for-wp/css/form.css file because every time you update the plugin, your changes will be lost.

  5. Danny van Kooten
    Member
    Plugin Author

    Posted 11 months ago #

    Ah, didn't see your other post, good to hear. Glad you're using an up-to-date browser. :-)

  6. deus_073
    Member
    Posted 11 months ago #

    Oh, good to know regarding the update. I actually styled it all the way there, in that css file. I'll move it into my theme's style sheet.

Reply

You must log in to post.

About this Plugin

About this Topic