Floating Label on Input Placeholder - html

I've created a floating label on top of a text field. Once the text field has been focused or has values, the label will float. However, 1 text field needs to be disabled. And upon setting readonly to true to the text field, the label for that disabled text field doesn't float. Here's the jsfiddle link so that we can easily understand each other https://jsfiddle.net/omhre5c9/
<div class="form-row">
<div class="form-group col-md-3">
<input type="number" id="floor" class="form-control" required>
<label class="form-control-placeholder" for="floor">Floor</label>
</div>
<div class="form-group col-md-3">
<input type="number" id="unit" class="form-control" required>
<label class="form-control-placeholder" for="unit">Unit</label>
</div>
<div class="form-group col-md-6">
<input type="text" id="bldg" class="form-control" value="TEST BLDG" readonly="true">
<label class="form-control-placeholder" for="bldg">Building Name</label>
</div>
</div>

You need to add css selector for read only or disabled.
.form-control[readonly="true"] + .form-control-placeholder
Here is the updated fiddle:
.form-group {
position: relative;
margin-bottom: 1.5rem;
}
.form-control-placeholder {
position: absolute;
top: 0;
padding: 7px 0 0 13px;
transition: all 200ms;
opacity: 0.5;
}
.form-control:focus + .form-control-placeholder,
.form-control:valid + .form-control-placeholder,
.form-control[readonly="true"] + .form-control-placeholder{
font-size: 75%;
transform: translate3d(0, -100%, 0);
opacity: 1;
}
<div class="form-row">
<div class="form-group col-md-3">
<input type="number" id="floor" class="form-control" required>
<label class="form-control-placeholder" for="floor">Floor</label>
</div>
<div class="form-group col-md-3">
<input type="number" id="unit" class="form-control" required>
<label class="form-control-placeholder" for="unit">Unit</label>
</div>
<div class="form-group col-md-6">
<input type="text" id="bldg" class="form-control" value="TEST BLDG" readonly="true">
<label class="form-control-placeholder" for="bldg">Building Name</label>
</div>
</div>,

You need to create a seperate class for transition in this case. Here is my answer.
HTML
<div class="form-row">
<div class="form-group col-md-3">
<input type="number" id="floor" class="form-control" required>
<label class="form-control-placeholder transition" for="floor">Floor</label>
</div>
<div class="form-group col-md-3">
<input type="number" id="unit" class="form-control" required>
<label class="form-control-placeholder transition" for="unit">Unit</label>
</div>
<div class="form-group col-md-6">
<input type="text" id="bldg" class="form-control" value="TEST BLDG" readonly="true">
<label class="form-control-placeholder" for="bldg">Building Name</label>
</div>
</div>,
CSS
.form-group {
position: relative;
margin-bottom: 1.5rem;
}
.form-control-placeholder {
position: absolute;
top: 0;
padding: 7px 0 0 13px;
opacity: 0.5;
}
.transition {
transition: all 200ms;
}
.form-control:focus + .transition,
.form-control:valid + .transition {
font-size: 75%;
transform: translate3d(0, -100%, 0);
opacity: 1;
}

Related

Prevent input data from showing in url - Flask

I am gathering customer data from a web app - however once data is input the data displays in the URL search bar and I am just wondering about how to prevent that from happening?
here is my current code:
<form>
<div class="row">
<div class="col-75">
<div class="container">
<form action="/action_page.php", method="POST">
<div class="row">
<div class="col-50">
<h3>Billing Address</h3>
<label for="fname"><i class="fa fa-user"></i> Full Name</label>
<input type="text" id="fname" name="firstname" placeholder="John M. Doe">
<label for="email"><i class="fa fa-envelope"></i> Email</label>
<input type="text" id="email" name="email" placeholder="john#example.com">
<label for="adr"><i class="fa fa-address-card-o"></i> Address</label>
<input type="text" id="adr" name="address" placeholder="1234 Example Street, Richmond">
<label for="city"><i class="fa fa-institution"></i> Suburb</label>
<input type="text" id="city" name="city" placeholder="Melbourne">
<div class="row">
<div class="col-50">
<label for="state">State</label>
<input type="text" id="state" name="state" placeholder="Victoria">
</div>
<div class="col-50">
<label for="postcode">Post Code</label>
<input type="text" id="postcode" name="postcode" placeholder="3934">
</div>
</div>
</div>
<div class="col-50">
<h3>Payment</h3>
<label for="fname">Accepted Cards</label>
<div class="icon-container">
<i class="fa fa-cc-visa" style="color:navy;">Visa</i>
<i class="fa fa-cc-amex" style="color:blue;">Amex</i>
<i class="fa fa-cc-mastercard" style="color:red;">Mastercard</i>
</div>
<label for="cname">Name on Card</label>
<input type="text" id="cname" name="cardname" placeholder="John More Doe">
<label for="ccnum">Credit card number</label>
<input type="text" id="ccnum" name="cardnumber" placeholder="1111-2222-3333-4444">
<label for="expmonth">Exp Month</label>
<input type="text" id="expmonth" name="expmonth" placeholder="September">
<div class="row">
<div class="col-50">
<label for="expyear">Exp Year</label>
<input type="text" id="expyear" name="expyear" placeholder="2018">
</div>
<div class="col-50">
<label for="cvv">CVV</label>
<input type="text" id="cvv" name="cvv" placeholder="352">
</div>
</div>
</div>
</div>
<label>
<input type="checkbox" checked="checked" name="sameadr"> Shipping address same as billing
</label>
<input type="submit" value="Continue to checkout" class="btn">
</form>
</div>
</div>
.row {
display: -ms-flexbox; /* IE10 */
display: flex;
-ms-flex-wrap: wrap; /* IE10 */
flex-wrap: wrap;
margin: 0 -16px;
}
.col-25 {
-ms-flex: 25%; /* IE10 */
flex: 25%;
}
.col-50 {
-ms-flex: 50%; /* IE10 */
flex: 50%;
}
.col-75 {
-ms-flex: 75%; /* IE10 */
flex: 75%;
}
.col-25,
.col-50,
.col-75 {
padding: 0 16px;
}
.container {
background-color: #f2f2f2;
padding: 5px 20px 15px 20px;
border: 1px solid lightgrey;
border-radius: 3px;
}
input[type=text] {
width: 100%;
margin-bottom: 20px;
padding: 12px;
border: 1px solid #ccc;
border-radius: 3px;
}
label {
margin-bottom: 10px;
display: block;
}
.icon-container {
margin-bottom: 20px;
padding: 7px 0;
font-size: 24px;
}
.btn {
background-color: #04AA6D;
color: white;
padding: 12px;
margin: 10px 0;
border: none;
width: 100%;
border-radius: 3px;
cursor: pointer;
font-size: 17px;
}
.btn:hover {
background-color: #45a049;
}
span.price {
float: right;
color: grey;
}
/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other (and change the direction - make the "cart" column go on top) */
#media (max-width: 800px) {
.row {
flex-direction: column-reverse;
}
.col-25 {
margin-bottom: 20px;
}
}
Any help would be really appreciated :)
You have an unnecessary <form> tag on the first line of your HTML and you are missing a closing </div> tag at the end. Changing this seems to resolve the issue:
<div class="row">
<div class="col-75">
<div class="container">
<form action="/action_page.php" , method="POST">
<div class="row">
<div class="col-50">
<h3>Billing Address</h3>
<label for="fname"><i class="fa fa-user"></i> Full Name</label>
<input type="text" id="fname" name="firstname" placeholder="John M. Doe">
<label for="email"><i class="fa fa-envelope"></i> Email</label>
<input type="text" id="email" name="email" placeholder="john#example.com">
<label for="adr"><i class="fa fa-address-card-o"></i> Address</label>
<input type="text" id="adr" name="address" placeholder="1234 Example Street, Richmond">
<label for="city"><i class="fa fa-institution"></i> Suburb</label>
<input type="text" id="city" name="city" placeholder="Melbourne">
<div class="row">
<div class="col-50">
<label for="state">State</label>
<input type="text" id="state" name="state" placeholder="Victoria">
</div>
<div class="col-50">
<label for="postcode">Post Code</label>
<input type="text" id="postcode" name="postcode" placeholder="3934">
</div>
</div>
</div>
<div class="col-50">
<h3>Payment</h3>
<label for="fname">Accepted Cards</label>
<div class="icon-container">
<i class="fa fa-cc-visa" style="color:navy;">Visa</i>
<i class="fa fa-cc-amex" style="color:blue;">Amex</i>
<i class="fa fa-cc-mastercard" style="color:red;">Mastercard</i>
</div>
<label for="cname">Name on Card</label>
<input type="text" id="cname" name="cardname" placeholder="John More Doe">
<label for="ccnum">Credit card number</label>
<input type="text" id="ccnum" name="cardnumber" placeholder="1111-2222-3333-4444">
<label for="expmonth">Exp Month</label>
<input type="text" id="expmonth" name="expmonth" placeholder="September">
<div class="row">
<div class="col-50">
<label for="expyear">Exp Year</label>
<input type="text" id="expyear" name="expyear" placeholder="2018">
</div>
<div class="col-50">
<label for="cvv">CVV</label>
<input type="text" id="cvv" name="cvv" placeholder="352">
</div>
</div>
</div>
</div>
<label>
<input type="checkbox" checked="checked" name="sameadr"> Shipping address same as billing
</label>
<input type="submit" value="Continue to checkout" class="btn">
</form>
</div>
</div>
</div>
(Note: my editor may have formatted your code differently to the original question)

Why is the "required" HTML attribute is not working?

As the heading suggests, the required attribute is not working, so I cannot seem to be able to validate my form.
I am creating an event registration form.
I have tried encapsulating each element inside form,but that doesn't seem to work.
What can I do to help with that? Please excuse me if the question is childish. I am a beginner, and I am trying to practice as much as I can.
......................................................................................................................................................
<html>
<head>
<style>
* {
box-sizing: border-box;
}
text-danger {
color: #e74c3c;
}
input[type=text], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
resize: horizontal;
}
legend {
font: bold 1.0em Arial, Helvetica, sans-serif;
color: #00008B;
background-color: #FFFFFF;
}
label {
padding: 12px 12px 12px 0;
display: inline-block;
}
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
float: right;
}
input[type=submit]:hover {
background-color: #45a049;
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
fieldset {
border: 1px solid #61B5CF;
margin-top: 1.4em;
padding: 0.6em;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
#media screen and (max-width: 600px) {
.col-25, .col-75, input[type=submit] {
width: 100%;
margin-top: 0;
}
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
input:not([type=submit]):invalid {
background-color: #ffdddd;
}
input:not([type=submit]):valid {
background-color: #ddffdd;
}
input:not([type=submit]):invalid:required {
background: #ffdddd url('http://www.developerdrive.com/wp-content/uploads/2013/08/asterisk1.png') no-repeat right top;
}
input:not([type=submit]):valid:required {
background: #ddffdd url('http://www.developerdrive.com/wp-content/uploads/2013/08/asterisk1.png') no-repeat right top;
}
input:not([type=submit]):optional {
background-color: #add1ef;
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
</style>
</head>
<body>
<div class="container">
<h2> WIE ILS'19 Registration</h2>
<form novalidate="">
<fieldset>
<legend>Login Details</legend>
<div class="form-group">
<label class="col-md-2 control-label">E-Mail</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input name="email" placeholder="E-Mail Address" class="form-control" type="text" required>
</div>
</div>
</div>
<br></br>
<!-- Text input-->
<div class="form-group">
<label class="col-md-2 control-label" >Password</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="password" name="password" id="password" onchange='check_pass();' required>
</div>
</div>
</div>
<br></br>
<!-- Text input-->
<div class="form-group">
<label class="col-md-2 control-label" >Confirm Password</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="password" name="confirm_password" id="confirm_password" onchange='check_pass();' required>
</div>
</div>
</div>
<br></br>
</form>
</fieldset>
<form>
<fieldset>
<legend>Personal Information</legend>
<form>
<div class="form-group">
<label class="col-xs-2 control-label">First Name</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="first_name" placeholder="First Name" class="form-control" type="text" required>
</div>
</div>
</div>
</form>
<br></br>
<!-- Text input-->
<form>
<div class="form-group">
<label class="col-xs-2 control-label" >Last Name</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="last_name" placeholder="Last Name" class="form-control" type="text" required>
</div>
</div>
</div>
</form>
<br></br>
<!-- Text input-->
<form>
<div class="form-group">
<label class="col-md-2 control-label">Contact No.</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input name="contact_no" placeholder="(+92)" class="form-control" type="text" required>
</div>
</div>
</div>
</form>
<br></br>
<form>
<div class="form-group">
<label class="col-md-2 control-label">CNIC No.</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="contact_no" placeholder="No-Hyphens" class="form-control" type="text" id="message" required>
<p class="help-block text-danger"></p>
</div>
</div>
</div>
</form>
<br></br>
</fieldset>
</form>
<form novalidate="">
<fieldset>
<legend>Education Details</legend>
<form>
<div class="form-group">
<label class="col-xs-2 control-label">University/Institute</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-education"></i></span>
<input name="first_name" placeholder="Institute Name" class="form-control" type="text" required>
</div>
</div>
</div>
</form>
<br></br>
<!-- Text input-->
<div class="form-group">
<label class="col-xs-2 control-label" >Degree Program </label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="last_name" placeholder="Last Name" class="form-control" type="text" required>
</div>
</div>
</div>
<br></br>
<!-- Text input-->
<div class="form-group">
<label class="col-md-2 control-label">Semester</label>
<div class="col-md-3 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-tasks"></i></span>
<input name="contact_no" placeholder="" class="form-control" type="text" required>
</div>
</div>
</div>
<br></br>
</fieldset>
</form>
<form novalidate="">
<h5 style="font-weight:bold" >Do you need accomodation?</h5>
<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
<br>
<br>
<button type="submit" name="submit" value="registration" id="submit" disabled>Submit</button>
</div>
</form>
<script >
function check_pass() {
if (document.getElementById('password').value ==
document.getElementById('confirm_password').value) {
document.getElementById('submit').disabled = false;
} else {
document.getElementById('submit').disabled = true;
}
}
</script>
</body>
</html>
In order for the submit to work, you need to put it inside of the form that you would like to submit. There are other ways of doing it, but that usually incorporates JavaScript and JQuery. The reason it is preventing you from submitting when it is inside the form though, is due to the novalidate attribute on the form. Just remove that and you should be good to go!
P.S. Even though the field is required on the front-end, that is all client side so it's not hard to go in and change it. It's always a good idea to validate it on the back-end as well. Think of the front-end as more of a suggestion and less of a final verdict.

Bootstrap form - scroll does not appear when screen is resized

I'm working on a project with a Bootstrap form. Very simply, I would like the form to have a scroll bar when the window is resized. I tried adding the overflow-auto class to my div, but that doesn't work for it. So when I resize my window, no scroll appears. Here's my code.
.form-container {
border-radius: 25px;
border: 1px solid black;
padding: 15px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.register-container { max-width: 500px; }
.title-header {
font-size: 25px;
font-weight: bold;
}
<div class="overflow-auto container form-container register-container">
<h1 class="title-header">REGISTER</h1>
<form id="register" method="post" action="register">
<?php writeMessageBoxIfMessage($message); ?>
<div class="form-group row">
<div class="col-sm-6">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">FIRST NAME</label> <br>
<input id="firstname" name="firstname" maxlength="80" required>
</div>
<div class="col-sm-6">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">LAST NAME</label> <br>
<input id="lastname" name="lastname" maxlength="80" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">EMAIL</label> <br>
<input type="email" id="email" name="email" maxlength="255" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">PASSWORD</label> <br>
<input type="password" id="password" name="password" maxlength="80" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">CONFIRM PASSWORD</label> <br>
<input type="password" id="confirm-password" name="confirm-password" maxlength="80" required>
</div>
<div class="col-sm-6">
Already have an account? <br> Click here</span> to login.
</div>
<div class="col-sm-6">
<input id="register" type="submit" name="submit"
value="REGISTER" />
</div>
</div>
</form>
</div>
Can anyone provide some suggestions so I can get this to scroll?
Can’t replicate this at the moment but try using
position: absolute;
and give a container
position: relative;
Rather than using the ‘fixed’ position.
Let me know if this doesn’t work.
I hope you want internal scroll if the form is more in height.
Use the following CSS,
Try it.
#register {
max-height: 200px;
overflow: scroll;
}
Please add media
#media (max-height: 420px) {
#register {
height: 150px;
overflow-x: hidden;
overflow-y: scroll;
}
}
for better solution and check your device height should be (max-height: yourDeviceHeight) in media
.form-container {
border-radius: 25px;
border: 1px solid black;
padding: 15px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.register-container { max-width: 500px; }
.title-header {
font-size: 25px;
font-weight: bold;
}
#media (max-height: 420px) {
#register {
height: 150px;
overflow-x: hidden;
overflow-y: scroll;
}
}
<div class="overflow-auto container form-container register-container">
<h1 class="title-header">REGISTER</h1>
<form id="register" method="post" action="register">
<?php writeMessageBoxIfMessage($message); ?>
<div class="form-group row">
<div class="col-sm-6">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">FIRST NAME</label> <br>
<input id="firstname" name="firstname" maxlength="80" required>
</div>
<div class="col-sm-6">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">LAST NAME</label> <br>
<input id="lastname" name="lastname" maxlength="80" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">EMAIL</label> <br>
<input type="email" id="email" name="email" maxlength="255" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">PASSWORD</label> <br>
<input type="password" id="password" name="password" maxlength="80" required>
</div>
<div class="col-sm-12">
<label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm">CONFIRM PASSWORD</label> <br>
<input type="password" id="confirm-password" name="confirm-password" maxlength="80" required>
</div>
<div class="col-sm-6">
Already have an account? <br> Click here</span> to login.
</div>
<div class="col-sm-6">
<input id="register" type="submit" name="submit"
value="REGISTER" />
</div>
</div>
</form>
</div>

How to Place Two Input Fields Side-by-Side

I've been trying to place two input fields side-by-side for sometime now and and I can't get them to actually get inline. Here's my HTML:
<div class="container">
<div class="form-group name1 col-md-6">
<label for="exampleInputEmail1" class="formText">FIRST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverName">
</div>
<div class="form-group name2 col-md-6">
<label for="exampleInputEmail1" class="formText">LAST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverPhone">
</div>
</div>
I'm trying to utilize Bootstrap as well, but I can't for the life of me get them to align side-by-side. Here's the corresponding CSS:
.name1 {
float: left;
}
.name2 {
float: right;
}
#name {
width: 223.67px;
height: 40.25px;
}
.form-group {
margin-left: 5%;
margin-right: 5%;
}
.containerr {
display: inline-block;
}
This is my output:
Whats the best way to place them side-by-side?
Bootstrap should do this for you. Looks like you're missing the <div class="row"> around your columns:
<div class="container">
<div class="row">
<div class="form-group name1 col-md-6">
<label for="exampleInputEmail1" class="formText">FIRST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverName">
</div>
<div class="form-group name2 col-md-6">
<label for="exampleInputEmail1## Heading ##" class="formText">LAST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverPhone">
</div>
</div>
</div>
Judging by the size of your output, you might need to use different column sizes. Try to set col-sm-6 or col-xs-6 classes. col-md-6 might be to large in your case.
#name {
width: 223.67px;
height: 40.25px;
}
.form-group {
display: inline-block;
width: calc(50% - 1px);
padding: 0 !important;
}
.container {
display: inline-block;
width: 90%;
margin-left: 5% !important;
margin-right: 5% !important;
}
.form-control {
margin: 0 !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="form-group name1 col-md-6">
<label for="exampleInputEmail1" class="formText">FIRST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverName">
</div>
<div class="form-group name2 col-md-6">
<label for="exampleInputEmail1" class="formText">LAST NAME:*</label>
<input type="text" class="form-control" id="name" aria-describedby="emailHelp" name="muverPhone">
</div>
</div>
The above should work on larger resolutions.

How can I line up this button with the textboxes?

I would like the left side of the button flush with the textboxes. I'm using bootstrap 3 if that makes a difference. Here is my html code for the form. I can add my CSS if that's necessary as well. Thank you.
h1 {
font-size:83px;
}
.btn-primary {
background: #ffffff;
border-color: #ffffff;
color: #f05324;
}
.btn-default, .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
background: #ffffff;
border-color: #ffffff;
color: #f05324;
}
.panel-default {
border: none;
}
input[type="text"] {
color:white !important;
}
input[type="email"] {
color:white !important;
}
.model-content {
color:black !important;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.navbar-default {
background-color: #000000;
}
body {
background: #f05324 !important;
margin-bottom: 80px;
color: #ffffff;
}
.page-header, .panel-body, .panel, .panel-default, .col-lg-9, .row {
background: #f05324 !important;
}
.form-control{
background-color: #f05324;
color: #000000;
}
hr {
border-color: #ffffff;
background-color: #ffffff;
color: #ffffff;
}
.link {
color: #ffffff;
}
.page-header {
margin-top: 0;
}
.panel-body {
padding-top: 0;
}
.img-featured {
margin-top : 15px;
margin-bottom: 15px;
margin-right : 15px;
}
.img-project{
margin-top : 15px;
margin-bottom: 15px;
}
.show-onclick {
display: none;
}
.show-onclick1 {
display: none;
}
.block {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
margin-left: // half the width of your img
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<form class="form-horizontal" method="post" action="submit.php" enctype="multipart/form-data">
<div class="form-group">
<label for="name" class="col-sm-2 control-label">NAME:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="name" name="name">
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">EMAIL:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="email" name="email">
</div>
</div>
<div class="form-group">
<label for="phoneNumber" class="col-sm-2 control-label">PHONE:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="phone" name="phone">
</div>
</div>
<div class="form-group">
<label for="major" class="col-sm-2 control-label">MAJOR:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="major" name="major">
</div>
</div>
<hr>
<div class="form-group">
<label for="itemForSale" class="col-sm-2 control-label">ITEM FOR SALE:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="itemForSale1" name="itemForSale1">
</div>
</div>
<div class="form-group">
<label for="quantity" class="col-sm-2 control-label">QUANTITY:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="quantity1" name="quantity1">
</div>
</div>
<div class="form-group">
<label for="price1" class="col-sm-2 control-label">PRICE:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="price1" name="price1">
</div>
</div>
<div class="form-group">
<label for="itemOneImg1" class="col-sm-2 control-label">IMAGE 1:</label>
<div class="col-sm-10">
<input type="file" accept=".jpg, .jpeg, .png" class="form-control" name="itemOneImg1">
</div>
</div>
<div class="form-group">
<label for="itemOneImg2" class="col-sm-2 control-label">IMAGE 2:</label>
<div class="col-sm-10">
<input type="file" accept=".jpg, .jpeg, .png" class="form-control" name="itemOneImg2">
</div>
</div>
<input id="additional-files" type="button" value="Additional Projects" class="btn btn-default">
</form>
If you want the left edge of the button to match up with the left edge of the text boxes then you just need to add an offset using the Bootstrap grid as follows:
<form class="form-horizontal" method="post" action="submit.php" enctype="multipart/form-data">
...
<div class="form-group">
<label for="itemOneImg2" class="col-sm-2 control-label">IMAGE 2:</label>
<div class="col-sm-10">
<input type="file" accept=".jpg, .jpeg, .png" class="form-control" name="itemOneImg2">
</div>
</div>
<div class="form-group">
<!-- Adjust col-sm-X for the buttons to adjust their positioning
Could also add btn-block class to make the button span the column -->
<div class="col-sm-offset-2 col-sm-9">
<input id="additional-files" type="button" value="Additional Projects" class="btn btn-default">
</div>
<div class="col-sm-1">
<input id="submit" type="button" value="Submit" class="btn btn-default">
</div>
</div>
</form>
More details (and another example) can be found on the Bootstrap website: http://getbootstrap.com/css/#forms-horizontal
EDIT: Based on additional information in comments.