<h1>Newsletter Subscription Form #3</h1>
<p class="zoom-area"><b>CSS</b> rules for a better Subscription Form Widget. </p>
<section class="widget widget_blog_subscription">
<form action="#" method="post" accept-charset="utf-8" id="subscribe-blog">
<p>Subscribe to our newsletter.</p>
<p>
<input type="text" name="email" style="width: 95%; padding: 1px 2px" placeholder="Enter your email address" value="" id="subscribe-field">
</p>
<p>
<input type="submit" value="Follow me!">
</p>
</form>
</section>
<section class="widget widget_blog_subscription option-b">
<form action="#" method="post" accept-charset="utf-8" id="subscribe-blog">
<p>Subscribe to our newsletter.</p>
<p>
<input type="text" name="email" style="width: 95%; padding: 1px 2px" placeholder="Enter your email address" value="" id="subscribe-field">
</p>
<p>
<input type="submit" value="Follow me!">
</p>
</form>
</section>
<div class="link-container">
<a target="_blank" href="https://www.silocreativo.com/en/subscription-form-responsive-newsletters-css/" class="more-link">Visit the original article</a>
</div>
@import url('https://fonts.googleapis.com/css?family=PT+Sans+Narrow');
.widget_blog_subscription {
display: block;
margin: 50px auto;
width: 60%;
max-width: 490px;
min-width: 320px;
position: relative;
overflow: hidden;
background-color: #F6F6F2;
border-radius: 5px;
padding: 50px;
background-color: #fff;
background-size: 100% 1em;
background-image: -webkit-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 79px, #abced4 79px, #abced4 81px, rgba(0, 0, 0, 0.03) 81px),
-webkit-linear-gradient(#eee .05em, transparent .05em);
background-image: -moz-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 79px, #abced4 79px, #abced4 81px, rgba(0, 0, 0, 0.03) 81px),
-moz-linear-gradient(#eee .05em, transparent .05em);
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 79px, #83B3DB 79px, #83B3DB 81px, rgba(0, 0, 0, 0.03) 81px),
linear-gradient(#eee .05em, transparent .05em);
}
.widget_blog_subscription p {
margin: 0;
text-align: center;
}
.widget_blog_subscription p:first-child {
margin: 0 0 30px;
color: #83B3DB;
text-transform: uppercase;
text-align: center;
font-size: 15px;
letter-spacing: 1px;
}
.widget_blog_subscription p:nth-child(2) {
width: 65%;
float: left;
}
.widget_blog_subscription p:nth-child(3) {
width: 35%;
float: left;
}
.widget_blog_subscription input[type="text"] {
margin: 0;
color: #999;
padding: 15px !important;
text-align: left;
width: 100% !important;
outline: none;
border: 0;
font-size: 14px;
background-color: #fff;
}
.widget_blog_subscription input[type="text"]::-webkit-input-placeholder {
color: #d0d0d0;
}
.widget_blog_subscription input[type="text"]:-moz-placeholder {
color: #d0d0d0;
}
.widget_blog_subscription input[type="text"]::-moz-placeholder {
color: #d0d0d0;
}
.widget_blog_subscription input[type="text"]:-ms-input-placeholder {
color: #d0d0d0;
}
.widget_blog_subscription input[type="submit"] {
margin: 0;
background-color: #83B3DB;
color: #fff;
padding: 16px !important;
text-align: center;
width: 100%;
outline: none;
border: 0;
text-transform: uppercase;
font-size: 13px;
cursor: pointer;
-webkit-transition: .1s all ease-in-out;
-moz-transition: .1s all ease-in-out;
-o-transition: .1s all ease-in-out;
transition: .1s all ease-in-out;
}
.widget_blog_subscription input[type="submit"]:hover {
background-color: #F29B91;
box-shadow: 0px 0px 0px 5px #F29B91;
}
/* Option B */
.option-b.widget_blog_subscription {
background-color: #ddd;
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
background-size: 60px 60px;
background-position: 0 0, 30px 30px;
}
.option-b.widget_blog_subscription p:first-child {
color: #000;
}
.option-b.widget_blog_subscription input[type="text"] {
}
.option-b.widget_blog_subscription input[type="submit"] {
background-color: #8ac26d;
}
.option-b.widget_blog_subscription input[type="submit"]:hover {
background-color: #eb5f5f;
box-shadow: 0px 0px 0px 5px #eb5f5f;
}
/* demo stuff */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
background-color: #fff;
margin-bottom: 50px;
}
html, button, input, select, textarea {
font-family: 'Montserrat', Helvetica, sans-serif;
color: #ddd;
}
h1 {
text-align: center;
margin: 30px 15px;
}
.zoom-area {
max-width: 490px;
margin: 50px auto 75px;
font-size: 19px;
color: #ddd;
text-align: center;
}
.link-container {
text-align: center;
}
a.more-link {
text-transform: uppercase;
font-size: 12px;
background-color: #ddd;
padding: 14px 12px;
border-radius: 0;
color: #fff;
display: inline-block;
margin-right: 5px;
margin-bottom: 5px;
line-height: 1.5;
text-decoration: none;
margin-top: 50px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.