Skip to content

Instantly share code, notes, and snippets.

@blundell
Last active February 9, 2019 20:48
Show Gist options
  • Save blundell/c41537b6599d3ff1cf40df6be1f3dc30 to your computer and use it in GitHub Desktop.
Save blundell/c41537b6599d3ff1cf40df6be1f3dc30 to your computer and use it in GitHub Desktop.
Clean Mailchimp sign up form
<!-- Begin Mailchimp Signup Form -->
<style type="text/css">
#mc_embed_signup { border: none; text-align: center; width: 100%; } /* Signup form container */
.mc-field-group { display: inline-block; } /* positions input field horizontally */
#mce-EMAIL { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1em; ; border:none; border-bottom: 2px solid #000; color: #343434; background-color: transparent; padding: .7em 30em .7em 1em; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; display: inline-block; margin: 0; } /* Input Styles */
.clear { display: inline-block; } /* positions button horizontally in line with input */
.button { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1em; letter-spacing: .03em; color: #fff; background-color: #000 ; padding: .7em 2em; border: 2px solid #000 ; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; display: inline-block; margin: 0; } /* Button Styles */
:-webkit-input-placeholder { color: #ABB0B2 ; } /* WebKit browsers */
:-moz-placeholder { color: #ABB0B2 ; } /* Mozilla Firefox 4 to 18 */
::-moz-placeholder { color: #ABB0B2 ; } /* Mozilla Firefox 19+ */
:-ms-input-placeholder { color: #ABB0B2 ; } /* Internet Explorer 10+ */
@media (max-width: 768px) { /* positions input field and button underneath each other with 100% width for tablet and mobile */
.mc-field-group { display: block; max-width: 100%; }
#mce-EMAIL { padding: .7em 0 .7em 1em; width: 120%; margin: 0; }
.clear { display: block; width: 100% }
.button { width: 100%; margin: .5em 0 0 0; }
}
</style>
<!-- This is the code you will get from Mailchimp’s NAKED Signup Form -->
<div id="mc_embed_signup">
<form action="//heyimcat.us8.list-manage.com/subscribe/post?u=1800cb34cabc1dabd900bcc16&amp;id=4913529a1d" method="post"
id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<!-- Text Input Field -->
<div class="mc-field-group">
<input type="email" placeholder="Your Email" name="EMAIL" class="required email" id="mce-EMAIL"></div>
<!-- /Text Input Field -->
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div><!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_0b5586be71b0fee16a03f5684_e41ec18eab" tabindex="-1" value="">
</div>
<!-- Submit Button -->
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
<!-- /Submit Button -->
</div>
</form>
</div>
<!--End mc_embed_signup-->
@blundell
Copy link
Author

blundell commented Feb 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment