Form not working as it should - html

Question:
1. Why is the "required" function not working in my contact form?
2. Why can I not make use of the full width of the input-field. See img.
I can only write on the left half of the input field.
HTML:
<div id="content">
<div class="contact">
<fieldset class="name group">
<label for="name" class="name">Name</label>
<input id="name" name="name" required pattern="[A-Za-z-0-9]+\s[A-Za-z]+" title="firstname lastname"/>
</fieldset>
<fieldset class="email group">
<label for="email" class="email">Email</label>
<input type="email" id="email" name="email" required title="Submit a valid Email">
</fieldset>
<fieldset class="phone group">
<label for="phone" class="phone">Telephone</label>
<input type="tel" id="phone" name="phone" pattern="(\+?\d[- .]*){7,17}" required title="Submit an international, national or local phone number"/>
</fieldset>
<fieldset class="message group">
<label class="message">Message</label>
<input type="text" id="message" required/>
</fieldset>
<fieldset class="send group">
<input type="submit" value="Send" class="sendButton">
</fieldset>
</div>
</div>
CSS:
#content
{
max-width: 50.694%;
position: absolute;
bottom: 0;
background: none repeat scroll 0 0 rgba(0, 0, 0, .55);
border-radius: 13px;
width: 730px;
margin: 0 0 6.6% 25.9167%;
box-shadow: 0 0 0 2px #000000, 2px 2px 30px 1px rgba(199, 255, 100, 0.73);
}
.contact{
width: 100%;
margin: 10px;
}
fieldset{
border: 0;
margin: 0;
width: 100%;
padding: 1%;
}
.name, .email, .message{
padding-right: 29px;
}
label{
color: #d8d9de;
font-family:'apple_chancerychancery';
font-size: 1.2em;
padding-left: 10px;
}
input{
margin-right: 70px;
padding: 6px;
text-align: left;
border-radius: 10px;
background: none repeat scroll 0 0 rgba(255, 240, 260, 0.5);
}
#name, #email, #phone, #message{
padding-right: 50%;
float: right;
color: #253c93;
text-decoration: none;
border: 1px dotted #29FF00;
font-family: 'Calibri', Arial, sans-serif;
font-size: 1em;
width: 23%;
}
div#inner-editor{
padding: 30px;
}
#message{
padding-top: 10%;
}
.sendButton{
background: rgba(0, 0, 0, 0);
color: #d8d9de;
font-size: 1.2em;
font-family: 'apple_chancerychancery';
padding: 0.8% 4%;
border: none;
margin-left: 42%;
box-shadow: inset 2px 2px 9px rgba(199, 255, 100, 0.73), inset -2px -2px 9px rgba(199,
255, 100, 0.73);
}
::-webkit-input-placeholder { /* WebKit browsers */
color: #d8d9de;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #d8d9de;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #d8d9de;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #d8d9de;
}

You are missing your form tag. It works for me once I add your form tag in:
<div id="content">
<div class="contact">
<form>
<fieldset class="name group">
<label for="name" class="name">Name</label>
<input id="name" name="name" required pattern="[A-Za-z-0-9]+\s[A-Za-z]+" title="firstname lastname"/>
</fieldset>
<fieldset class="email group">
<label for="email" class="email">Email</label>
<input type="email" id="email" name="email" required title="Submit a valid Email">
</fieldset>
<fieldset class="phone group">
<label for="phone" class="phone">Telephone</label>
<input type="tel" id="phone" name="phone" pattern="(\+?\d[- .]*){7,17}" required title="Submit an international, national or local phone number"/>
</fieldset>
<fieldset class="message group">
<label class="message">Message</label>
<input type="text" id="message" required/>
</fieldset>
<fieldset class="send group">
<input type="submit" value="Send" class="sendButton">
</fieldset>
</form>
</div>
</div>
http://jsfiddle.net/GEs34/

Here is the fiddle where your second issue has been resolved.
Just removed the padding-right from the name, email, phone and message id input fields and increased their width percentage.

Related

CSS: right : 0px ; property is not working

The code is as follows:
.form-wrapper {
border: 1px solid rgb(68, 240, 0);
background-image: radial-gradient(rgb(252, 252, 252), #ffffff);
border-radius: 20px;
width: 400px;
position: relative;
padding: 10px 40px;
margin: 10px auto;
}
.close-button {
position: absolute;
right: 0px;
left: auto;
border: 1px solid rgb(240, 0, 0);
width: 40px;
}
.form-header {
border: 1px solid rgb(232, 0, 240);
position: relative;
text-align: center;
}
.form-header h3 {
display: inline;
}
.form-outline {
border: 1px solid rgb(237, 250, 235);
border-radius: 20px;
padding: 5px 30px;
}
.form-field {
margin-top: 5px;
}
.form-field input {
outline: none;
width: 100%;
display: block;
padding: 5px;
font-size: 15px;
border: 2px solid rgb(179, 177, 177);
border-radius: 6px;
background-color: rgba(227, 247, 250, 0.918);
}
.form-field small {
display: block;
visibility: hidden;
}
<div class="form-wrapper">
<div class="close-button"><i class="far fa-times-circle "></i></div>
<div class="form-header">
<!-- <div style="border: 2px solid aqua;"></div> -->
<h3> Lets talk!</h3>
</div>
<form class="form-outline">
<div class="form-field">
<label class="field-title">Name </label><br>
<input type="text" id="" value="" placeholder="Enter your name."> <br>
<small class="error-message">Error message</small>
</div>
<div class="form-field">
<label class="field-title">Phone </label><br>
<input type="text" id="" value="" placeholder="Enter your phone number."> <br>
<small class="error-message">Error message</small>
</div>
<div class="form-field">
<label class="field-title">Organization </label><br>
<input type="text" id="" value="" placeholder="Enter your organization's name."><br>
<small class="error-message">Error message</small>
</div>
<div class="form-field">
<label class="field-title">Address </label><br>
<input type="text" id="" value="" placeholder="Enter your address."> <br>
<small class="error-message">Error message</small>
</div>
<div class="form-field">
<label class="field-title">Email </label><br>
<input type="text" id="" value="" placeholder="Enter your email."> <br>
<small class="error-message">Error message</small>
</div>
</form>
</div>
The result looks like this.
I want to move the "close button" to the right side sticking to the green border of form-wrapper div. The right property is not working. I don't know if it is a silly mistake or lack of knowledge. Any help or direction would be appreciated.
I tested the right property using another html file and it is working perfectly. But I could not move this close button to right.
try to add this to your close-button class. it worked for me.
.close-button {
direction: rtl;
}
Your code is fine and should work propely. Maybe your styles without right: 0px; is cached by browser. Try to open your project in new private / incognito tab. It prevents browser to read cached styled.

How to make form smaller and put the form in the middle

I have tryied everything to make my contact form in the centre and tidy it up a bit, because I was Name, Email Address and Age on the same line. I want Subject and drop down select on the second line and lastly i have tried to get the text area on the last line. I got the contact for of w3schools. I have tried searching the web and youtube for the answer, but nothing has worked.
* {
box-sizing: border-box;
}
input[type=text],
select,
textarea,
input[type=email],
input[type=number] {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical;
}
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
<div class="container">
<form action="/action_page.php">
<input type="text" id="name" name="name" placeholder="Name">
<input type="email" id="email" name="email" placeholder="Email Address">
<input type="number" id="age" name="age" placeholder="Age">
<input type="text" id="subject" name="subject" placeholder="Subject">
<select type="dropdown" name="contact" placeholder="Age">
<option placeholder="australia">Australia</option>
<option value="canada">Canada</option>
<option value="usa">USA</option>
</select>
<textarea id="message" name="message" placeholder="Talk To Us" style="height:200px"></textarea>
<input type="submit" value="Submit">
</form>
</div>
My form
This is the way i am trying to get my form
* {
box-sizing: border-box;
}
input[type=text],
select,
textarea,
input[type=email],
input[type=number] {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical;
}
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
width:80%;
max-width:800px;
margin:0 auto;
}
.flex-row{
display:flex;
justify-content:space-between;
align-content:center;
align-items:strech;
line-height:45px;
}
.flex-row input,
.flex-row textarea,
.flex-row select{
margin:5px;
}
input[type=submit]{
margin:5px auto;
display:block;
}
.flex-row input:nth-child(3){
flex-basis:150px;
}
<div class="container">
<form action="/action_page.php">
<div class="flex-row">
<input type="text" id="name" name="name" placeholder="Name">
<input type="email" id="email" name="email" placeholder="Email Address">
<input type="number" id="age" name="age" placeholder="Age">
</div>
<div class="flex-row">
<input type="text" id="subject" name="subject" placeholder="Subject">
<select type="dropdown" name="contact" placeholder="Age">
<option placeholder="australia">Australia</option>
<option value="canada">Canada</option>
<option value="usa">USA</option>
</select>
</div>
<div class="flex-row">
<textarea id="message" name="message" placeholder="Talk To Us" style="height:200px"></textarea>
</div>
<input type="submit" value="Submit">
</form>
</div>
Give with to your container and center it with margin: auto See my code.
Ho sorry, here you can find what you need..

Inline form layout broken

I am trying to create an inline form where the label is on top of the input like in a bootstrap form. I have tried various options and although i have menaged to get the label on top of the input, the layout breaks after the first 2 inputs.
I have done a screenshot and would appreciate it someone could check my code and point out my error. many thanks
BTW:
The form-group i am using is not to be confused with the bootstrap
form-group.
.form-group {
display: inline-block;
margin-bottom: 0 !important;
margin-top: 10px !important;
width: 45%;
padding: 5px 5px;
}
.form-area {
background-color: #161616;
padding: 10px 40px 20px;
margin: 10px 0px 50px;
border: 1px solid #111;
}
.form-control {
background: -moz-linear-gradient(90deg, rgba(64, 64, 64, 1) 0%, rgba(33, 33, 33, 1) 100%) repeat scroll 0 0 padding-box !important;
border-radius: 5px;
box-shadow: 0 0 2px #4b4b4b inset, 0 1px 1px rgba(0, 0, 0, 0.3) !important;
color: #fff !important;
font-size: 0.875rem;
line-height: 1.43;
min-height: 2.8em !important;
padding: 0.5em 1.07em;
border: none;
color: #999 !important;
}
#editForm {
display: inline;
}
.labelStyle {
display: block;
color: black;
margin-left: 5px;
font-size: 14px;
}
.svcBorder {
border: 1px solid #2d2d2d;
border-radius: 5px;
padding: 15px;
margin-bottom: 5px;
margin-top: 30px;
}
input[type="text"] {
display: block;
width: 100%;
height: 24px;
border-radius: 5px;
margin-top: 5px;
padding: 4px 8px 0;
font-size: 14px;
color: dimgrey;
-webkit-box-sizing: border-box;
/* For legacy WebKit based browsers */
-moz-box-sizing: border-box;
/* For legacy (Firefox <29) Gecko based browsers */
box-sizing: border-box;
}
<form id="editForm" name="editForm" style="display: none;">
<div id="message">
<div class="text"></div>
</div>
<div class="form-group">
<label class="labelStyle" for="id">id</label>
<input id="id" name="id" readonly type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="service">Service</label>
<input id="service" name="service" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="activity">Activity</label>
<input id="activity" name="activity" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="dept">Department</label>
<input id="dept" name="dept" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="company">Company</label>
<input id="company" name="company" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="user">User</label>
<input id="user" name="user" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="item">Item</label>
<input id="item" name="item" type="text" value="">
</div>
<div class="form-group">
<label class="labelStyle" for="date">Date</label>
<input id="date" name="date" type="text" value="">
</div>
</form>
According to your screenshot, this seems to affect the very first field in your form only - so the element preceding it,
<div id="message"><div class="text"></div></div>
likely has something to do with that ...
We didn’t see any styling for that in your code snippet, but if it has margins/paddings/borders or anything like that set, it might still influence the position of the following elements, even if it is currently “empty” (as in, no text content.)

display two input buttons in a form

I come to you about an issue that I'm having with a contact form that I created using bootstrap see the jsfiddle below for a replica of my code...
My issue is the two buttons that I have for submit and clear are displaying on top of each other for some reason instead of inline next to each other...
I used CSS to format the form contents as table rows, columns and cells all contact labels are in one column and form fields in another (that's if I got my CSS coded properly) and I've put the form in a div with bootstrap class of col-md-6 which will only give it 50% width of the page...
Anyhow like I mentioned my issue is the two buttons are showing under the first column of the table under the labels which I guess is not giving it enough room and as a result the two buttons are stacked on top of each other my question is how would I go about showing the two buttons next to each other by using the full width of the form instead the width of the column??
Here is a link to my jsfiddle: https://jsfiddle.net/neenus/nofuvqod/3/
#jumbotron-form {
display: block;
opacity: 0.90;
}
form {
text-align: left;
display: table;
border-spacing: 0.25em;
}
.form-group {
display: table-row;
}
label {
display: table-cell;
vertical-align: top;
}
input {
display: inline;
}
textarea {
width: 100%;
}
<div class="jumbotron" id="jumbotron-form">
<div class="col-md-6">
<form action="SUBMIT">
<div class="form-group">
<label for="name">Name: </label>
<input type="text" name="name" id="name" placeholder="enter your name" autocomplete="off">
</div>
<div class="form-group">
<label for="tel">Telephone: </label>
<input type="tel" name="tel" pattern="Telephone" id="tel" placeholder="(999) 999-9999" autocomplete="off">
</div>
<div class="form-group">
<label for="email">e-Mail: </label>
<input type="email" name="email" id="email" placeholder="name#email.ca" autocomplete="off">
</div>
<div class="form-group">
<label for="usrmsg">Message: </label>
<textarea name="message" id="usrmsg" cols="50" rows="5" placeholder="enter your message here..."></textarea>
</div>
<div>
<input type="submit" value="Submit" id="submit">
<input type="reset" value="Clear">
</div>
</form>
</div>
</div>
Here is the HTML5 & Bootstrap markup for your code....
/***********************************************************************************************/
/* Input Field */
/***********************************************************************************************/
input[type="text"],
input[type="name"],
input[type="phone"],
input[type="email"],
textarea {
border: none;
padding: 8px;
border-radius: 3px;
width:100%;
color: #454545;
font-size: 16px;
font-style: normal;
background-color: #F5F5F5;
}
input[type="text"]:hover:focus,
input[type="name"]:hover:focus,
input[type="phone"]:hover:focus,
input[type="email"]:hover:focus,
textarea:hover:focus {
padding: 8px;
border-radius: 3px;
min-width: 280px;
font-style: normal;
background: #F5F5F5;
}
/***********************************************************************************************/
/* Button & Reset */
/***********************************************************************************************/
input[type="submit"],
input[type="reset"],
button {
font-size: 16px;
font-weight: 300;
border: none;
padding: 10px 30px;
color: #ffffff;
border-radius: 2px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, .2);
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
/* border radius */
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
/* prevents bg color from leaking outside the border */
background-color: #2FB7D5;
/* layer fill content */
-moz-box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
-webkit-box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
}
input[type="submit"]:hover,
input[type="reset"]:hover,
button:hover {
font-size: 16px;
font-weight: 300;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
/* border radius */
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
/* prevents bg color from leaking outside the border */
background-color: #2FB7D5;
/* layer fill content */
-moz-box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
-webkit-box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
/* inner shadow */
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<!-- ================================================
Contact Form Start
================================================= -->
<section class="contact-form">
<div class="container">
<div class="row">
<div class="col-lg-6 col-lg-offset-3">
<form action="" method="post" name="form" id="form">
<p>
<label for="name">Name</label>
<input type="text" name="" id="name" placeholder="Name" required>
</p>
<p>
<label for="email">Email</label>
<input type="email" name="email" id="email" placeholder="Email" required>
</p>
<p>
<label for="message">Message</label>
<textarea name="" id="message" cols="40" rows="5" placeholder="Write here..." required></textarea>
</p>
<input type="submit" value="Send">
<input type="reset" value="Write Again">
</form>
</div>
</div>
</div>
</section>
You can use flex-box for this , here i updated your code please check the snippet and fiddle
#jumbotron-form {
display: block;
background-size: cover;
opacity: 0.90;
}
form {
text-align: left;
display: table;
border-spacing: 0.25em;
}
.form-group {
display: table-row;
}
label {
display: table-cell;
vertical-align: top;
}
input {
display: inline;
}
textarea {
width: 100%;
}
.submit {
display: flex;
}
.submit input {
margin-right: 20px;
}
<div class="jumbotron" id="jumbotron-form">
<div class="col-md-6">
<form action="SUBMIT">
<div class="form-group">
<label for="name">Name: </label>
<input type="text" name="name" id="name" placeholder="enter your name" autocomplete="off">
</div>
<div class="form-group">
<label for="tel">Telephone: </label>
<input type="tel" name="tel" pattern="Telephone" id="tel" placeholder="(999) 999-9999" autocomplete="off">
</div>
<div class="form-group">
<label for="email">e-Mail: </label>
<input type="email" name="email" id="email" placeholder="email#domain.com" autocomplete="off">
</div>
<div class="form-group">
<label for="usrmsg">Message: </label>
<textarea name="message" id="usrmsg" cols="50" rows="5" placeholder="enter your message here..."></textarea>
</div>
<div class="submit">
<input type="submit" value="Submit" id="submit">
<input type="reset" value="Clear">
</div>
</form>
</div>
</div>
Problem is because you used display: table in <form>. I modified your markup and css by adding another <div> wrapper for all .form-group elements.
Checkout it out: https://jsfiddle.net/nofuvqod/5/
Snippet:
#jumbotron-form {
display: block;
background-size: cover;
opacity: 0.90;
}
form {
text-align: left;
border-spacing: 0.25em;
}
.form-table{
display: table;
}
.form-group {
display: table-row;
}
label {
display: table-cell;
vertical-align: top;
}
input {
display: inline;
}
textarea {
width: 100%;
}
HTML
<div class="jumbotron" id="jumbotron-form">
<div class="col-md-6">
<form action="SUBMIT">
<div class="form-table">
<div class="form-group">
<label for="name">Name: </label>
<input type="text" name="name" id="name" placeholder="enter your name" autocomplete="off">
</div>
<div class="form-group">
<label for="tel">Telephone: </label>
<input type="tel" name="tel" pattern="Telephone" id="tel" placeholder="(999) 999-9999" autocomplete="off">
</div>
<div class="form-group">
<label for="email">e-Mail: </label>
<input type="email" name="email" id="email" placeholder="email#domain.com" autocomplete="off">
</div>
<div class="form-group">
<label for="usrmsg">Message: </label>
<textarea name="message" id="usrmsg" cols="50" rows="5" placeholder="enter your message here..."></textarea>
</div>
</div>
<div>
<input type="submit" value="Submit" id="submit">
<input type="reset" value="Clear">
</div>
</form>
</div>
</div>
Use the button container with form-group class.
<div class="form-group">
<input type="submit" value="Submit" id="submit">
<input type="reset" value="Clear">
</div>

Trying to get input and submit boxes on the same line

I know this question has been asked lots, but I am a complete novice at coding and could therefore do with some help.
I'm adding a mailchimp subscribe box in a wordpress footer. I've followed instructions on how to customer the naked version to match formatting etc.
The final part is to get all three boxes in a single line at the bottom of the page. I just can't get my head around it.
Please help!
#mailchimp {
background: #F7C6CB;
color: #3D6392;
padding: 10px 7px;
}
#mailchimp input {
border: medium none;
color: #444;
font-family: architects daughter;
font-size: 0.7rem;
font-style: italic;
margin-bottom: 2px;
padding: 2px 2px;
width: 300px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
#mailchimp input.email {
background: #fff
}
#mailchimp input.name {
background: #fff
}
#mailchimp input[type="submit"] {
background: #BBD8DC;
color: #444;
cursor: hand;
font-size: 0.7rem;
width: 100px;
padding: 4px 0;
}
#mailchimp input[type="submit"]:hover {
color: #ffff
}
<div id="mailchimp">
<form action="//rocketfuelforlife.us16.list-manage.com/subscribe/post?u=3234aff37dd880f87f2f30d0e&id=3f511425b1" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<input type="text" size="30" value="Enter your first name" name="FNAME" class="name" id="mce-FNAME" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<input type="email" size="30" value="Enter your email address" name="EMAIL" class="required email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<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>
<div class="clear">
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</form>
</div>
I played around a bit with your code. I removed the clear class around your input submit and move the validation div below the input. I also reduced the width of the input to make sure they had enough space to align next to each other on one line. Run the code below the see the result of this:
#mailchimp {
background: #F7C6CB;
color: #3D6392;
padding: 10px 7px;
}
#mailchimp input {
border: medium none;
color: #444;
font-family: architects daughter;
font-size: 0.7rem;
font-style: italic;
margin-bottom: 2px;
padding: 2px 2px;
width: 200px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
#mailchimp input.email {
background: #fff
}
#mailchimp input.name {
background: #fff
}
#mailchimp input[type="submit"] {
background: #BBD8DC;
color: #444;
cursor: hand;
font-size: 0.7rem;
width: 100px;
padding: 4px 0;
}
#mailchimp input[type="submit"]:hover {
color: #ffff
}
<div id="mailchimp">
<form action="//rocketfuelforlife.us16.list-manage.com/subscribe/post?u=3234aff37dd880f87f2f30d0e&id=3f511425b1" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<input type="text" size="30" value="Enter your first name" name="FNAME" class="name" id="mce-FNAME" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<input type="email" size="30" value="Enter your email address" name="EMAIL" class="required email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
<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>
</form>
</div>
I added "display: inline-block" style to both of the text inputs and also the submit input to force them onto the same line. I also moved the submit input out of the div.clear and put it directly under the email input, which allows it to be in the same line.
#mailchimp {
background: #F7C6CB;
color: #3D6392;
padding: 10px 7px;
}
#mailchimp input {
border: medium none;
color: #444;
font-family: architects daughter;
font-size: 0.7rem;
font-style: italic;
margin-bottom: 2px;
padding: 2px 2px;
width: 300px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
display: inline-block;
}
#mailchimp input.email {
background: #fff
}
#mailchimp input.name {
background: #fff
}
#mailchimp input[type="submit"] {
background: #BBD8DC;
color: #444;
cursor: hand;
font-size: 0.7rem;
width: 100px;
padding: 4px 0;
display: inline-block;
}
#mailchimp input[type="submit"]:hover {
color: #ffff
}
<div id="mailchimp">
<form action="//rocketfuelforlife.us16.list-manage.com/subscribe/post?u=3234aff37dd880f87f2f30d0e&id=3f511425b1" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<input type="text" size="30" value="Enter your first name" name="FNAME" class="name" id="mce-FNAME" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<input type="email" size="30" value="Enter your email address" name="EMAIL" class="required email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
<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>
<div class="clear">
</div>
</form>
</div>
Okay, so I just created parent divs for the <input> blocks and then I just floated the divs left and right and then changed the #MailChimp css style to have a height of 20px. Here is my JSFiddle