set a divs besdie each other in a table reactjs - css

Im building a website that is like an airport booking's website
it has this table
i don't know how can I style it as shown in the photo
this is what I did
<div className="section>">
<div className="content">
<div className="container">
<div className="row">
<div className="planner">
<form>
<div className="checkbox">
<div className="row">
<label>
<input
className="checkbox-round"
type="checkbox"
defaultChecked={checked}
onChange={() => setChecked(!checked)}
/>
Türkiye'den Gönder
</label>
</div>
<label>
<input
className="checkbox-round"
type="checkbox"
defaultChecked={!checked}
onChange={() => setChecked(!checked)}
/>
Türkiye'ye Getir
</label>
</div>
<div className="form">
<div className="row">
<label htmlFor="">Kurye Taşıması</label>
<label> Nereye</label>
</div>
<div className="row">
<select>
<option value="">Almanya</option>
<option value=""></option>
</select>
</div>
<div className="labels">
<div className="inputs">
<label>AĞRILIK</label>
<input type="weight" placeholder="KG" />
<label>UZUNLUK</label>
<input type="height" placeholder="CM" />
<label>CENSLIK</label>
<input type="height" placeholder="CM" />
<label> YUKSELIK</label>
<input type="height" placeholder="CM" />
</div>
</div>
<div className="row">
<div className="total">
<h2>ODENECEK TUTAR</h2>
</div>
<button>DEVAM ET</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</>
);
};
and this is the CSS file
.checkbox{
margin: 0px 5px 0px 0px;
padding: 10px;
align-items: center;
justify-content: center;
}
.checkbox-round {
display: inline-block;
width: 1.3em;
height: 1.3em;
background-color: white;
border-radius: 50%;
vertical-align: middle;
border: 1px solid #ddd;
-webkit-appearance: none;
outline: none;
cursor: pointer;
}
body{
overflow: hidden;
background-color: #2a3541 !important;
}
.dot{
color: rgb(236, 5, 5);
}
.container{
max-width: 100%;
margin: 0;
padding: 0;
background-color: #2a3541;
} .planner{
margin: 22px 200px 20px 20px !important;
border:2px #ddd;
border-radius:10px;
background-color: #f1f1f1;
padding: 1rem;
margin: 0;
max-width: 100%;
}
.row{
float: right;
width: 40%;
display: inline-flex;
flex-direction: row;
}
.inputs{
display: inline;
max-height:100%;
max-width: 100%;
margin: 0;
padding: 0;
border: none;
background-color: #f1f1f1;
border-radius: 10px;
color: #2a3541;
}
.labels{
display: block;
}
div label{
display:block;
}
so basically, what I can't figure out is how to put the inputs beside each other just like the given photo with saving the positions of other divs

Related

How do I put these input elements on the center of the page, make the below divs align perfectly, and keep the prior span elements to the left?

I have three inputs with a span before and a div after, the last having an i element immediately after:
<div class="container-fluid">
<form id="recaptcha_form">
<fieldset class="form-group">
<legend class="form_legend">Create Account</legend>
<div class="form_field">
<span class="validate_symbol">✗</span>
<input type="text" class="register_field" id="id_username">
<div style = "display:none" class="error" aria-live="polite"></div>
</div>
<div class="form_field">
<span class="validate_symbol">✗</span>
<input type="text" class="register_field"id="id_username">
<div class="error" aria-live="polite"></div>
</div>
<div class="form_field">
<span class="validate_symbol" >✗</span>
<input type="text" class="register_field"id="id_username">
<i id="password_toggle">SHOW</i>
<div class="error" ></div>
</div>
</fieldset>
</form>
</div>
CSS
input{
width: 200px;
}
/* Error messages below input */
.error{
/* Same width as above input */
width: 200px;
/* Width of .validate_symbol */
margin-left: 20px;
font-size: small;
color: white;
background-color: #b30000;
text-align: center;
}
.validate_symbol{
color: red;
font-size: 20px;
margin-right: none;
}
/* SHOW/HIDE password element */
#password_toggle{
margin-left: -45px;
cursor: pointer;
font-size: 10px;
}
Which results in:
I have also added CSS:
body{
text-align: center;
}
form {
display: inline-block;
}
Which results in:
The .error div still not being perfectly aligned with the above input and added "show" text causing misalignment of the password field.
I would like to center the input elements, while keeping the .validate_symbol elements immediately before on all screen sizes and perfectly align the .error divs with the above input elements.
I recreated your code (simplifying the class names) and this was the result:
Here my code, I hope it helps! 🖖🐱‍🚀
HTML:
<div class="container">
<form action="#">
<fieldset>
<legend>Create Account</legend>
<div class="wrapper">
<input type="text">
<div class="error">I am an error.</div>
</div>
<div class="wrapper">
<input type="text">
<div class="error">I am an error.</div>
</div>
<div class="wrapper">
<input type="text">
<div class="error">I am an error.</div>
</div>
</fieldset>
</form>
</div>
CSS:
*,
*:before,
*:after {
box-sizing: border-box;
}
.container {
width: 300px;
}
.container form fieldset {
appearance: none;
width: 100%;
margin: 0;
padding: 0;
display: grid;
grid-auto-flow: row;
gap: 1rem;
border: none;
}
.container form fieldset legend {
appearance: none;
width: 100%;
margin: 0;
padding: 1rem 1rem 1rem 2rem;
position: relative;
display: block;
font-size: 1.5rem;
font-weight: bold;
}
.container form fieldset .wrapper {
width: 100%;
padding: 0 0 0 2rem;
position: relative;
display: grid;
grid-auto-flow: row;
}
.container form fieldset .wrapper input {
appearance: none;
width: 100%;
margin: 0;
padding: 1rem;
position: relative;
border: none;
}
.container form fieldset .wrapper .error {
width: 100%;
padding: 0.5rem;
background-color: red;
}
.container form fieldset .wrapper:before {
content: "X";
position: absolute;
top: 0.25rem;
left: 0.25rem;
font-weight: 900;
color: red;
}

Why are my CSS elements spacing out by themselves?

Im working on a project, but my elements are very spaced out and I'm not the best at CSS. I don't know if it's doing it on it's own or something is wrong with my CSS. Can you please help find the problem?
<body>
<div class='top'>
<div class='top-left'>
<input type='text' class='info' id='totalBill' placeholder='Total bill'>
<input type='text' class='info' id='peopleAmount' placeholder='People'>
</div>
<div class='top-right'>
<div class='tip'>
<input type='text' class='info' id='tip' placeholder='Tip (in percent)'>
</div>
<button onclick = "calculate()"> Calculate </button>
</div>
</div>
<div class="bottom">
<input id="output" disabled>
<input id="moneyOutput" disabled>
</div>
</body>
</html>
CSS File Link - https://aaryank.codewizardshq.com/BillSplitter/style.css
Just replace the justify-content: space-around; to the justify-content: center; this will leave small space between your inputs and also reduce the height if you like like the following in your edited code
* {
outline: none;
border: none;
font-family: 'Fira Sans', sans-serif;
margin: 0;
}
.top-left,
.top-right {
position: absolute;
height: 60vh;
width: 50vw;
top: 0;
}
.top-right {
right: 0;
background: #7ACFD7;
}
.top-left {
left: 0;
background-color: #C22629;
}
.bottom {
position: absolute;
height: 40vh;
/*edited from height: 60vh;*/
width: 100vw;
bottom: 0;
left: 0;
background-color: #F1EFEE;
}
.top-left,
.top-right,
.bottom {
flex-direction: column;
display: flex;
justify-content: center;
/*Edited from justify-content: space-around;*/
place-items: center;
}
/**/
input[class='info'] {
font-size: 20px;
padding: 15px;
border-radius: 5px;
background: #FFF;
margin: 10px;
font-family: 'Fira Sans', sans-serif;
display: block;
}
input,
input::placeholder {
color: grey;
}
button {
font-size: 18px;
padding: 15px;
width: 50%;
;
background-color: transparent;
color: #F1EFEE;
border: 3px solid #F1EFEE;
border-radius: 10px;
cursor: pointer;
}
#output {
font-size: 20px;
background-color: transparent;
border-radius: 5px;
text-align: center;
color: black;
width: 50%;
}
#moneyOutput {
font-size: 50px;
padding: 5px;
background-color: transparent;
border-radius: 5px;
text-align: center;
color: black;
width: 50%;
}
<div class='top'>
<div class='top-left'>
<input type='text' class='info' id='totalBill' placeholder='Total bill'>
<input type='text' class='info' id='peopleAmount' placeholder='People'>
</div>
<div class='top-right'>
<div class='tip'>
<input type='text' class='info' id='tip' placeholder='Tip (in percent)'>
</div>
<button onclick="calculate()"> Calculate </button>
</div>
</div>
<div class="bottom">
<input id="output" disabled>
<input id="moneyOutput" disabled>
</div>

How to insert vertical line in the middle of page and move form to the left (css)

I have a quick question. How can I move my login form div to the left and have a vertical separator in the center of the page and still be able to place content on the right side of the page as well? What I thought of doing is using display: inline but when I use display: inline in my wrapper div it ruins the setup of the page. Thanks!
Code
* {
margin: 0;
padding: 0;
}
*:focus {
outline: none;
}
::placeholder {
color: grey;
}
body {
background-color: #ced4da;
}
.wrapper {
height: 100vh;
position: relative;
background-color: red;
}
.login-form {
background-color: green;
margin: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.email-input-field,
.password-input-field,
.submit-button {
display: block;
}
input[type="email"],
input[type="password"] {
border: none;
background: white;
height: 40px;
font-size: 12px;
margin-bottom: 8px;
width: 250px;
padding-left: 50px;
color: grey;
}
input[type="submit"] {
border: none;
background-color: #3DBB96;
height: 40px;
width: 100%;
font-size: 15px;
font-weight: lighter;
color: white;
}
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="CSS/Login.css">
</head>
<body>
<div class="wrapper">
<div class="login-form">
<form action="Login.php" method="POST">
<div class="email-input-field">
<input type="email" name="emailPost" placeholder="Email" required>
</div>
<div class="password-input-field">
<input type="password" name="passwordPost" placeholder="Password" required>
</div>
<div class="submit-button">
<input type="submit" value="Login">
</div>
</form>
</div>
<div class="splitter"></div>
</div>
</body>
Relatively simple using Flexbox, we don't set a flex value on the div.leftside so it's width stays dependent on the content, the splitter can be represented by a border, however having it being a separate element opens more styling possibilities
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #1d1f20;
color: #FFF;
}
*:focus {
outline: none;
}
::placeholder {
color: grey;
}
.main {
display: flex;
height: 100vh;
}
.rightSide {
flex: 1 0 0%;
background: #7e7eff;
}
.leftSide {
background: #262658;
padding: 0 20px;
display: flex;
align-items: center;
}
.splitter {
background: grey;
width: 10px;
}
.login-form {
background-color: #1d1f20;
border: 1px solid;
padding: 10px;
}
.email-input-field,
.password-input-field,
.submit-button {
display: block;
}
input[type="email"],
input[type="password"] {
border: none;
background: white;
height: 40px;
font-size: 12px;
margin-bottom: 8px;
width: 250px;
padding-left: 50px;
color: grey;
}
input[type="submit"] {
border: none;
background-color: #3DBB96;
height: 40px;
width: 100%;
font-size: 15px;
font-weight: lighter;
color: white;
}
<div class="main">
<div class="leftSide">
<div class="login-form">
<form action="Login.php" method="POST">
<div class="email-input-field">
<input type="email" name="emailPost" placeholder="Email" required>
</div>
<div class="password-input-field">
<input type="password" name="passwordPost" placeholder="Password" required>
</div>
<div class="submit-button">
<input type="submit" value="Login">
</div>
</form>
</div>
</div>
<div class="splitter"></div>
<div class="rightSide">
</div>
</div>
Same can be achieved using CSS Grid
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #1d1f20;
color: #FFF;
}
*:focus {
outline: none;
}
::placeholder {
color: grey;
}
.main {
display: grid;
height: 100vh;
grid-template-columns: auto auto 1fr;
}
.rightSide {
background: #7e7eff;
}
.leftSide {
background: #262658;
padding: 0 20px;
display: flex;
align-items: center;
}
.splitter {
background: grey;
width: 10px;
}
.login-form {
background-color: #1d1f20;
border: 1px solid;
padding: 10px;
}
.email-input-field,
.password-input-field,
.submit-button {
display: block;
}
input[type="email"],
input[type="password"] {
border: none;
background: white;
height: 40px;
font-size: 12px;
margin-bottom: 8px;
width: 250px;
padding-left: 50px;
color: grey;
}
input[type="submit"] {
border: none;
background-color: #3DBB96;
height: 40px;
width: 100%;
font-size: 15px;
font-weight: lighter;
color: white;
}
<div class="main">
<div class="leftSide">
<div class="login-form">
<form action="Login.php" method="POST">
<div class="email-input-field">
<input type="email" name="emailPost" placeholder="Email" required>
</div>
<div class="password-input-field">
<input type="password" name="passwordPost" placeholder="Password" required>
</div>
<div class="submit-button">
<input type="submit" value="Login">
</div>
</form>
</div>
</div>
<div class="splitter"></div>
<div class="rightSide">
</div>
</div>
EDIT :
The way we align stuff inside a flexed container is : align-self on the flex items or aling-items on the flexed container, Now since flexbox only goes in one direction either vertically or horizontally, we change that using flex-direction property, we put one vertically and align the items as we like, then put another one horizontally and align the items as we like.
I tried to make my own example to make it somewhat clean ?
It's better if you would find a course about flexbox, google it or look for it on youtube (which where i learned everything i know)
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #1d1f20;
color: #FFF;
}
.main {
height: 100vh;
background-color: pink;
display: flex;
}
.main>.left {
flex: 1;
display: flex;
background: brown;
}
.main>.left>.form-wrapper {
flex: 1;
background: orange;
padding: 10px;
align-self: center;
display: flex;
flex-direction: column;
}
.main>.left>.form-wrapper>form {
background: #1d1f20;
padding: 10px;
width: 200px;
align-self: flex-end;
}
.main>.left>.form-wrapper>form>input {
margin-bottom: 5px;
width: 100%;
}
.main>.split {
width: 5px;
background: #00ff74;
}
.main>.right {
flex: 1;
background: purple;
display: flex;
}
.main>.right>.welcome {
flex: 1;
background: #2d162d;
align-self: center;
display: flex;
flex-direction: column;
}
.main>.right>.welcome>h2 {
background: #9a7d9a;
align-self: center;
}
<div class="main">
<div class="left">
<div class="form-wrapper">
<form>
<input type="text" placeholder="Name" name="">
<input type="text" placeholder="Email" name="">
<input type="button" value="Done !" name="">
</form>
</div>
</div>
<div class="split"></div>
<div class="right">
<div class="welcome">
<h2>Welcome !</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris</p>
</div>
</div>
</div>
I used flex to create what you required. You will have to check the new CSS and HTML(separator and right-side part) to completely understand what I did.
* {
margin: 0;
padding: 0;
}
*:focus {
outline: none;
}
::placeholder {
color: grey;
}
body {
background-color: #ced4da;
}
.wrapper {
height: 100vh;
position: relative;
background-color: red;
display: flex;
justify-content: space-around;
}
.wrapper .login-form,
.wrapper .right-side {
width: 45%;
}
.login-form {
background-color: green;
padding: 10px;
}
.email-input-field,
.password-input-field,
.submit-button {
display: block;
}
input[type="email"],
input[type="password"] {
border: none;
background: white;
height: 40px;
font-size: 12px;
margin-bottom: 8px;
color: grey;
width: 100%;
}
input[type="submit"] {
border: none;
background-color: #3DBB96;
height: 40px;
width: 100%;
font-size: 15px;
font-weight: lighter;
color: white;
}
.separator {
width: 0px;
border: 2px solid black;
}
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="CSS/Login.css">
</head>
<body>
<div class="wrapper">
<div class="login-form">
<form action="Login.php" method="POST">
<div class="email-input-field">
<input type="email" name="emailPost" placeholder="Email" required>
</div>
<div class="password-input-field">
<input type="password" name="passwordPost" placeholder="Password" required>
</div>
<div class="submit-button">
<input type="submit" value="Login">
</div>
</form>
</div>
<div class="separator"></div>
<div class="right-side">Right side content</div>
</div>
</body>
You should probably look into Flexbox or other options. W3 has a couple of ways to setup a two column layout in their howto article: https://www.w3schools.com/howto/howto_css_two_columns.asp
Also checkout the complete guide to flexbox from css-tricks

Html5 form validation dont display error with data slide

I have a form validation using the html5, but when the form is inside a certain div, the validation doesnt work.
The div:
div class="slide story" id="slide-6" data-slide="6">
...
</div>
If the form is out of this div it works fine! But when this div surround the form the validation doens't work.
The Css:
#slide-6 {
background-color: #00387F;
color: #e4e6e5;
padding-bottom: 350px;
padding-top: 90px;
}
.contact-info .contact-content{
margin-bottom: 30px;
}
.contact-info p{
margin-bottom: 20px;
}
.contact-info p i{
font-size: 16px;
margin-right: 10px;
}
.contact-form{}
.contact-form input[type="text"],
.contact-form input[type="email"]{
border: 1px solid #E8E8E8;
padding: 8px 14px;
width: 100%;
margin-bottom: 20px;
}
.contact-form textarea{
border: 1px solid #E8E8E8;
padding: 8px 14px;
width: 100%;
margin-bottom: 20px;
}
#media (max-width: 767px) {
#slide-6 {
background-image: none;
}
}
#slide-6 .line-row .hr {
background-color: #FFFFFF;
color: #FFFFFF;
}
#slide-6 a {
color: inherit;
outline: none;
text-decoration: none;
}
#media (max-width: 767px) {
.with-hover-text{
margin-bottom: 2em;
margin-top: 1em;
}
}
#contact-row-4 {
padding-top: 125px;
}
#contact-row-4 .col-12 {
height: 175px;
overflow: hidden;
padding-top: 20px;
transition: all ease-in .5s;
}
#contact-row-4 img {
display: block;
margin: 0 auto;
max-height: 100%;
max-width: 100%;
}
#contact-row-4 .col-12:hover {
height: 175px;
padding-top: 0;
}
#contact-row-4 .col-12 .hover-text {
display: none;
font-size: 20px;
}
The form:
<div class="slide story" id="slide-6" data-slide="6">
<div class="col-sm-7 col-sm-offset-1">
<form action="php/send-contact.php" class="contact-form" name="contact-form" method="post">
<div class="row">
<div class="col-sm-6">
<input type="text" name="name" required="required" placeholder="Name*">
</div>
<div class="col-sm-6">
<input type="email" name="email" required="required" placeholder="Email*">
</div>
<div class="col-sm-6">
<input type="text" name="subject" placeholder="Subject">
</div>
<div class="col-sm-6">
<input type="text" name="website" placeholder="Website">
</div>
<div class="col-sm-12">
<textarea name="message" required="required" cols="30" rows="7" placeholder="Message*"></textarea>
</div>
<div class="col-sm-12">
<input type="submit" name="submit" value="Send Message" class="btn btn-send">
</div>
</div>
</form>
</div>
</div>
Can you please help me?

MailChimp Form and Button in the same line

On my MailChimp form I would like to have the form and submit the button inline with one another.
I have been trying several different variations of float and display but none of them have the desired effect.
Here is the original code. Anyone have any suggestions on how to align the form and the button?
#mc_embed_signup .button {
clear: both;
background-color: #aaa;
border: 0 none;
border-radius: 4px;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-size: 15px;
font-weight: bold;
height: 32px;
line-height: 32px;
margin: 10px 0px 10px 0;
padding: 0 22px;
text-align: center;
text-decoration: none;
vertical-align: top;
white-space: nowrap;
width: auto;
}
#mc_embed_signup .mc-field-group input {
display: block;
width: 100%;
padding: 8px 0;
text-indent: 2%;
}
#mc_embed_signup input.mce_inline_error {
border-color: #6B0505;
}
#mc_embed_signup input {
border: 1px solid #999;
-webkit-appearance: none;
}
#mc_embed_signup .mc-field-group label {
display: block;
margin-bottom: 3px;
}
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
/* 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="//utz-benkel.us10.list-manage.com/subscribe/post?u=9684bbce9ec8413a5614ca7c3&id=116fd11541" 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 Addresse </label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="name#domain.de">
</div>
<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_9684bbce9ec8413a5614ca7c3_116fd11541" tabindex="-1" value=""></div>
<div class="clear text-center"><input type="submit" value="Senden" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
In newsletter is recommended use "old style" code, with <table> and inline style. If you use table can have the form next to each other and it will be compatible on most devices.
Live example on the jsFiddle
button {
clear: both;
background-color: #aaa;
border: 0 none;
border-radius: 4px;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-size: 15px;
font-weight: bold;
height: 32px;
line-height: 32px;
margin: 10px 0px 10px 0;
padding: 0 22px;
text-align: center;
text-decoration: none;
vertical-align: top;
white-space: nowrap;
width: auto;
}
input {
display: block;
width: 100%;
padding: 8px 0;
text-indent: 2%;
}
<table>
<tr>
<td><input type="text" placeholder="name#name.com" /></td>
<td><button>Send</button></td>
</tr>
</table>
I made some changes to your code for inline elements:
#mc_embed_signup .button {
clear: both;
background-color: #aaa;
border: 0 none;
border-radius: 4px;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-size: 15px;
font-weight: bold;
height: 32px;
line-height: 32px;
/*margin: 10px 0px 10px 0;*/
/*padding: 0 22px;*/
text-align: center;
text-decoration: none;
vertical-align: top;
white-space: nowrap;
/*width: auto;*/
}
#mc_embed_signup .mc-field-group input {
/*display: block;*/
/*width: 100%;*/
/*padding: 8px 0;*/
text-indent: 2%;
}
#mc_embed_signup input.mce_inline_error {
border-color: #6B0505;
}
#mc_embed_signup input {
border: 1px solid #999;
-webkit-appearance: none;
}
#mc_embed_signup .mc-field-group label {
display: block;
margin-bottom: 3px;
}
#mce-EMAIL{
padding: 8px 0;
display: inline-block;
width: 70%;
}
#mc-embedded-subscribe{
display: inline-block;
width: 20%;
margin: 0;
padding: 0;
}
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="//utz-benkel.us10.list-manage.com/subscribe/post?u=9684bbce9ec8413a5614ca7c3&id=116fd11541" 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 Addresse </label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="name#domain.de">
<input type="submit" value="Senden" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
<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_9684bbce9ec8413a5614ca7c3_116fd11541" tabindex="-1" value=""></div>
<div class="clear text-center"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
http://jsfiddle.net/mitsuru/3Lusbvjx/1/
You should put the submit input near the email from input, then "inline-block" and "width" in % do the magic.
It doesn't use tables, !importants, nor needs to fix or apply tricks. It's just CSS.
Cheers.

Resources