I'm looking to get this email subscribe form from MailChimp to appear all on one single horizontal line. Here is how it appears now:
I'd like for the wording to display how it currently is, and have the input field for email and the Subscribe button all on the same line.
Here is the code I am currently using:
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#546C7C; clear:left; font:14px Helvetica,Arial,sans-serif; width:300px; color: #fff;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="//Gaylebrickman.us15.list-manage.com/subscribe/post?u=48a6b6c222ef150a6559c63df&id=bf44114a3d" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<label for="mce-EMAIL">For Mindfulness Events and Tips</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_48a6b6c222ef150a6559c63df_bf44114a3d" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
Just add the following CSS to your <style> tag:
#mc_embed_signup input.email,
#mc_embed_signup input.button {
display: inline-block;
}
The external stylesheet sets the display property to block for both of these elements, so this will override it and put them on the same line.
You only have to shift <div id="mc_embed_signup_scroll"> to below <label for="mce-EMAIL">For Mindfulness Events and Tips</label>.
And then you have to add this anywhere in the code:
<style>
#mc_embed_signup_scroll {display: inline}
</style>
Related
I got a custom email signup form from Mailchimp and implemented it on my wordpress website with elementor custom HTML, it kinda works but the problem is that when i log off my wordpress session and check the website as a visitor, the custom HTML gets written as a text instead of being read as a html file and also some tags get ignored such as style , form , input and script
Everything is getting saved to the database, it just doesn't read the code as it should. I purged all cache several times.
This the code i'm trying to insert and make it stay when im logged off
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-071822.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://gmail.us8.list-manage.com/subscribe/post?u=9eedbcb189ca63a07ad3fc7e8&id=96681ba87c&f_id=00546ae0f0" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_self">
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">Seu melhor email:
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" required>
<span id="mce-EMAIL-HELPERTEXT" class="helper_text"></span>
</div>
<div id="mce-responses" class="clear foot">
<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;" aria-hidden="true"><input type="text" name="b_9eedbcb189ca63a07ad3fc7e8_96681ba87c" tabindex="-1" value=""></div>
<div class="optionalParent">
<div class="clear foot">
<input type="submit" value="Garantir meu lugar" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
Logged in
Logged out
I am trying to make some changes to the Mailchimp embedded form HTML code. I was able to figure out how to change the color of the subscribe button, but I am having trouble figuring out:
How to move the subscribe button to appear next to the email address input field
How to have "Email Address*" appear in the email address input field vs. above it
How to (and if it's possible) to center the email address input field and subscribe button under the text on the landing page, it's currently aligned to the left.
Here is a Google Drive link to the image of how it currently looks: https://drive.google.com/file/d/15b9I3Ai6xdET39UetIhX9NsEE01oAqag/view?usp=sharing
This is how I would like it to look: https://drive.google.com/file/d/1mcwVYS3dOZA3M0UBymvFFaX0JqmQRonx/view?usp=sharing
Can you please show what what code I should insert and what I need to/should adjust? Thank you, here's the code I have right now:
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7_dtp.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:600px;}
#mc-embedded-subscribe { background-color: #4CAAD8 !important; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://emergingcrypto.us20.list-manage.com/subscribe/post?u=da91a69cad9ed7c2929bb4e6e&id=3ab4e9df0b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">Email Address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div id="mce-responses" class="clear foot">
<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;" aria-hidden="true"><input type="text" name="b_da91a69cad9ed7c2929bb4e6e_3ab4e9df0b" tabindex="-1" value=""></div>
<div class="optionalParent">
<div class="clear foot">
<input type="submit" value="Subscribe to stay smart" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js"></script><script type="text/javascript">(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
<!--End mc_embed_signup-->
This code currently displays the email field and the submit button on two lines. How can I have it display on one line with enough space for an email address with no box around submit.
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://spatialinc.us4.list-manage.com/subscribe/post?u=13c45188f9b54797f1d223963&id=2fb248a1eb" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_13c45188f9b54797f1d223963_2fb248a1eb" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
Just add some CSS to do what you ask to your style:
#mc_embed_signup_scroll{display:flex;}
Example:
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup {
background: #fff;
clear: left;
font: 14px Helvetica, Arial, sans-serif;
}
#mc_embed_signup_scroll {
display: flex;
}
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://spatialinc.us4.list-manage.com/subscribe/post?u=13c45188f9b54797f1d223963&id=2fb248a1eb" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_13c45188f9b54797f1d223963_2fb248a1eb" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
So I've been trying to implement a Mailchimp form onto my site so people can subscribe to the email newsletter. I am using Wordpress and trying to implement this via a Custom HTML Widget in my footer.
width:100%; wasn't working for me, but it will let me use it with a pixel value. Of course I want to be able to use 100% width and not have to use a pixel value. The only way I was able to use a % value is when I added position:absolute; but then the button only moves to be about 60% of whatever width I use. I am really stuck and just want the email input and the subscribe button to be at 100% width. Anyone have any suggestions for me? I feel like it's a simple fix but I have spent hours on it so far.
Here's what it looks like:
Here's the current code:
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{ width:80%;
position:absolute;
clear:left;
font:14px Helvetica,Arial,sans-serif; }
#mc-embedded-subscribe {
width:100%;
position:absolute;
background-color: #94a6bf !important; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="KEEPING THIS PRIVATE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_bb6e0bb53d927bf2a775cf919_9a92e414ab" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="SUBSCRIBE" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
Parent div also define full width. this works for me. try this.
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
div#mc_embed_signup_scroll {
width: 100%;
}
input#mce-EMAIL {
width: 100%;
margin: 10px 0px;
}#mc-embedded-subscribe {
width: 100%;
background-color: #94a6bf !important;
}
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="KEEPING THIS PRIVATE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_bb6e0bb53d927bf2a775cf919_9a92e414ab" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="SUBSCRIBE" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
use style attribute on the button (style="width:100%;")
<div id="mc_embed_signup">
<form action="KEEPING THIS PRIVATE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_bb6e0bb53d927bf2a775cf919_9a92e414ab" tabindex="-1" value=""></div>
<div><input type="submit" value="SUBSCRIBE" name="subscribe" id="mc-embedded-subscribe" class="button" style="width:100%;"></div>
</div>
</form>
</div>
I have this code on my WordPress site for a MailChimp optin, but for some reason the border all of a sudden disappeared, can you please see what I may be missing?
<div style="border-style: solid thin #FFFFFF">
<p style="float:left; padding: 0px 5px 0px 0px;"><img src="http://www.xxxx.com/wp-content/uploads/2017/06/photo.jpg" style="width:115px; height:auto;" class="border"></p>
<p><text
</p>
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="//xxxxxxx.us14.list-manage.com/subscribe/post?u=2b24d9a7eb0e64eed113ca92c&id=6444b29c17" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<label for="mce-EMAIL">Subscribe to our mailing list</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- 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;" aria-hidden="true"><input type="text" name="b_2b24d9a7eb0e64eed113ca92c_6444b29c17" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
Border style does not accept color, nor "thin" as a value.
You want to use "border" in the context you're attempting to:
<div style="border: solid thin #FFFFFF">
hello
</div>
https://jsfiddle.net/4tm3d1jm/
Your div element might be overridden by other styles applying borders (or border: none) to all div elements in your document, though.
Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/border-style?v=control
Use:
<div style= 'border: 2px solid #fff'>
Instead of your div
I hope that:
#mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}
Is between style tags
<style>#mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}</style>
If not, it won't work. Styles have to be applied in a css file, or between tags.
Additionally I want you to remember about css hierarchy (CSS Selector Hierarchy?)