Skip to content

Instantly share code, notes, and snippets.

@damashe
Forked from nathanbarry/ck_form.css
Created December 9, 2017 22:31
Show Gist options
  • Save damashe/c5d5566f77eac0e8d701a60b8ac02327 to your computer and use it in GitHub Desktop.
Save damashe/c5d5566f77eac0e8d701a60b8ac02327 to your computer and use it in GitHub Desktop.
One line form
.ck_form.single_line {
background: #f9f9f9;
font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;
line-height: 1.5em;
overflow: hidden;
color: #666;
font-size: 16px;
border: solid 1px #d1d1d1;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
clear: both;
margin: 20px 0px;
text-align: center;
}
.ck_form.single_line h3, #content .ck_form.single_line h3 {
text-align: center;
margin: 0px 0px 10px;
font-size: 28px;
}
.ck_form.single_line h4, #content .ck_form.single_line h4 {
text-align: center;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
text-transform: uppercase;
font-size: 18px;
font-weight: normal;
padding-top: 0px;
margin-top: 0px;
}
.ck_form.single_line p {
padding: 0px;
}
.ck_form * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#ck_subscribe_form {
clear: both;
}
.ck_form.single_line .ck_form_fields {
width: 100%;
float: left;
padding: 5%;
}
/* Form fields */
.ck_errorArea {
display: none; /* temporary */
}
#ck_success_msg {
padding: 10px 10px 0px;
border: solid 1px #ddd;
background: #eee;
}
.ck_form.single_line input[type="text"], .ck_form.single_line input[type="email"] {
font-size: 18px;
padding: 10px 8px;
width: 68%;
border: 1px solid #d6d6d6; /* stroke */
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px; /* border radius */
background-color: #fff; /* layer fill content */
margin-bottom: 5px;
height: auto;
float: left;
margin: 0px;
margin-right: 2%;
height: 42px;
}
.ck_form input[type="text"]:focus, .ck_form input[type="email"]:focus {
outline: none;
border-color: #aaa;
}
.ck_form.single_line .ck_checkbox {
display: none;
}
.ck_form.single_line .ck_subscribe_button {
color: #fff;
margin: 0px;
padding: 11px 0px;
font-size: 18px;
background: #0d6db8;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px; /* border radius */
cursor: pointer;
border: none;
text-shadow: none;
width: 30%;
float: left;
height: 42px;
}
.ck_form.single_line .ck_guarantee {
color: #626262;
font-size: 15px;
text-align: center;
padding: 15px 0px 0px;
display: block;
clear: both;
}
<script src="https://app.convertkit.com/assets/CKJS4.js?v=18"></script>
<div class="ck_form single_line">
<div class="ck_form_fields">
<h3>Never miss an essay</h3>
<h4>Join the free newsletter</h4>
<div id='ck_success_msg' style='display:none;'>
<p>You’re Almost Done! I just sent you an email. Open it and confirm your email address by clicking the link in it. You won't be subscribed until you complete this step.</p>
</div>
<!-- Form starts here -->
<form id="ck_subscribe_form" class="ck_subscribe_form" action="https://app.convertkit.com/landing_pages/000/subscribe" data-remote="true">
<input type="hidden" name="id" value="000" id="landing_page_id"></input>
<div class="ck_errorArea">
<div id="ck_error_msg" style="display:none">
<p>There was an error submitting your subscription. Please try again.</p>
</div>
</div>
<label class="ck_label" for="ck_emailField" style="display:none">Email Address</label>
<input type="email" name="email" placeholder="Email address" class="ck_email_address" id="ck_emailField" required></input>
<button class="subscribe_button ck_subscribe_button btn fields" id='ck_subscribe_button'>
Subscribe
</button>
<span class="ck_guarantee">No spam guaranteed. Unsubscribe at any time.</span>
</form>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment