So I am developing a site using bootstrap 4 , everything works fine but the column that i have, need to be floated automatically , but it doesn't , is there any issue with bootstrap 4 or am i missing anything ,
As this can be solve too writing custom css but i do think i am missing something , please help .
<?php
include ("layouts/header.php");
?>
<section class="booking">
<div class="container">
<div class="row">
<div class="section-header">
<h2>Booking Procedures</h2>
</div>
<div class="section-content">
<div class="col-12">
<form>
<div class="card text-center">
<div class="card-header">
Booking Step 2 Of 2
</div>
<div class="card-block">
<p>All * fields are compulsory</p>
<div class="col-12 col-md-3">
<div class="form-group">
<select class="form-control">
<option>Title</option>
<option>Mr.</option>
<option>Mrs.</option>
<option>Miss</option>
</select>
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="First Name *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Middle Name" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Last Name *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<select class="form-control" required="required">
<option>Nationality</option>
<option>Chinese</option>
<option>Indian</option>
</select>
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control datepicker" placeholder="Date Of Birth *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Occupation" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="email" class="form-control" placeholder="Email Address *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Detail Mailing Address *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Mobile Number *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Landline" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Passport Number *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control" placeholder="Place Of Issue *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control datepicker" placeholder="Date Of Issue *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<input type="text" class="form-control datepicker" placeholder="Date Of Expiry *" />
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<select class="form-control" required="required">
<option>How did you find us</option>
<option>Friends</option>
<option>Family</option>
<option>Online</option>
<option>Travel Blog</option>
<option>Trip Advisor</option>
<option>Others</option>
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<textarea class="form-control" placeholder="Emergency Contact * "></textarea>
</div>
</div>
</div>
<div class="col-12">
<p>Note: Please kindly note that you should be covered for, I- medical expenses, II- emergency air ambulance & III- Trip cancellation to plan this trip.</p>
</div>
<div class="col-12">
<div class="form-group">
<button type="submit" class="btn btn-sample3">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<?php include("layouts/footer.php"); ?>
Result i want
Result i got
Your code is not well formatted, you are using col- inside col- without the use of row. You need to have something like that
<div class="container" >
<div class="row">
<div class="col-12">
</div>
</div>
</div>
and to have nested row use this :
<div class="container" >
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-12">
</div>
</div>
</div>
</div>
</div>
refer to the documentation :
https://getbootstrap.com/docs/4.0/layout/grid/#nesting
Related
I am trying to make a Sign-UP form in html and CSS with notepad++ but whenever I try to run it on chrome, it loads very slowly. Is it a configuration error or something? What am I doing wrong? Is there a plugin needed? This is my entire code:
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Register</div>
<div class="card-body">
<div class="form-group row">
<label for="full_name" class="col-md-4 ">Full Name</label>
<div class="col-md-6">
<input type="text" class="form-control" name="full-name">
</div>
</div>
<div class="form-group row">
<label for="email_address" class="col-md-4 ">E-Mail Address</label>
<div class="col-md-6">
<input type="text" class="form-control" name="email-address">
</div>
</div>
<div class="form-group row">
<label for="user_name" class="col-md-4 ">User Name</label>
<div class="col-md-6">
<input type="text" class="form-control" name="username">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 ">Password</label>
<div class="col-md-6">
<input type="password" class="form-control">
</div>
</div>
<div class="col-md-6 stylish" offset-md-4>
<button type="submit" class="btn btn-primary"">
Register
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Add the bootstrap and jQuery plugins.
In HTML page link the external files properly.
In head section add the external links.
Maintain the folder structure neat so that linking extrnal files is easy.
If everything is correct go to this link to set up Chrome: https://www.webnots.com/fix-slow-page-loading-issue-in-google-chrome/
<!DOCTYPE html>
<html>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Register</div>
<div class="card-body">
<div class="form-group row">
<label for="full_name" class="col-md-4 ">Full Name</label>
<div class="col-md-6">
<input type="text" class="form-control" name="full-name">
</div>
</div>
<div class="form-group row">
<label for="email_address" class="col-md-4 ">E-Mail Address</label>
<div class="col-md-6">
<input type="text" class="form-control" name="email-address">
</div>
</div>
<div class="form-group row">
<label for="user_name" class="col-md-4 ">User Name</label>
<div class="col-md-6">
<input type="text" class="form-control" name="username">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 ">Password</label>
<div class="col-md-6">
<input type="password" class="form-control">
</div>
</div>
<div class="col-md-6 stylish" offset-md-4>
<button type="submit" class="btn btn-primary"">
Register
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
I'm struggling with the aliment on a horizontal form using Bootstrap 3. If I put every form-group one after another I have no problem. Check the image:
But as soon I make 2 rows so I can put an image to the right of the first 3 input fields, everything in that row expands and the vertical aliment with the bottom row gets all messed up:
Here's the code:
<form id="new-user-form" class="form-horizontal">
<div class="row">
<div class="col-sm-9">
<div class="form-group">
<label class="col-md-2 control-label">Nombre</label>
<div class="col-md-10">
<input class="form-control" name="fname" placeholder="Nombre" type="text">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Apellido</label>
<div class="col-md-10">
<input class="form-control" name="lname" placeholder="Apellido" type="text">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Usuario</label>
<div class="col-md-10">
<input class="form-control" name="username" placeholder="Nombre de Usuario" type="text" disabled="">
</div>
</div>
</div>
<div class="col-sm-3"><div class="form-group">
<div class="col-md-12 text-center">
<img src="img/mysteryman.png" />
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="col-md-2 control-label">E-mail</label>
<div class="col-md-10">
<input class="form-control" name="emailaddress" placeholder="Dirección de e-mail" type="email">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Tel. Celular</label>
<div class="col-md-10 no-padding">
<div class="col-xs-5 col-sm-4">
<input class="form-control" name="codtelcelular" placeholder="Código de Area" type="tel">
</div>
<div class="col-xs-7 col-sm-8">
<input class="form-control" name="telcelular" placeholder="Teléfono Celular" type="tel">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Tel. Fijo</label>
<div class="col-md-10 no-padding">
<div class="col-xs-5 col-sm-4">
<input class="form-control" name="codtelfijo" placeholder="Código de Area" type="tel">
</div>
<div class="col-xs-7 col-sm-8">
<input class="form-control" name="telfijo" placeholder="Teléfono Fijo" type="tel">
</div>
</div>
</div>
</div>
</div>
</form>
Any ideas? Thanks in advance!
You are missing a row.
<form id="new-user-form" class="form-horizontal">
<div class="row">
<div class="col-sm-9">
<div class="form-group">
<div class="row">
<label class="col-md-2 control-label">Nombre</label>
<div class="col-md-10">
<input class="form-control" name="fname" placeholder="Nombre" type="text">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-md-2 control-label">Apellido</label>
<div class="col-md-10">
<input class="form-control" name="lname" placeholder="Apellido" type="text">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-md-2 control-label">Usuario</label>
<div class="col-md-10">
<input class="form-control" name="username" placeholder="Nombre de Usuario" type="text" disabled="">
</div>
</div>
</div>
</div>
<div class="col-sm-3"><div class="form-group">
<div class="col-md-12 text-center">
<img src="img/mysteryman.png" />
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="col-md-2 control-label">E-mail</label>
<div class="col-md-10">
<input class="form-control" name="emailaddress" placeholder="Dirección de e-mail" type="email">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Tel. Celular</label>
<div class="col-md-10 no-padding">
<div class="col-xs-5 col-sm-4">
<input class="form-control" name="codtelcelular" placeholder="Código de Area" type="tel">
</div>
<div class="col-xs-7 col-sm-8">
<input class="form-control" name="telcelular" placeholder="Teléfono Celular" type="tel">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Tel. Fijo</label>
<div class="col-md-10 no-padding">
<div class="col-xs-5 col-sm-4">
<input class="form-control" name="codtelfijo" placeholder="Código de Area" type="tel">
</div>
<div class="col-xs-7 col-sm-8">
<input class="form-control" name="telfijo" placeholder="Teléfono Fijo" type="tel">
</div>
</div>
</div>
</div>
</div>
</form>
I really need some help here. I've been messing with this form all day and I can't get these boxes to show where I need them to. I'll include a picture below of how I want it to look. I've been trying different things with form-inline and form-horizontal but it's just not working.
Any help would be appreciated.
Here's some of what I've been trying:
<form class="form-horizontal">
<div class="col-md-6">
<h4>Shipping Address</h4>
<hr>
</div>
<div class="col-md-6">
<h4>Contact Info</h4>
<hr>
</div>
<div class="col-md-12">
<div class="form-group row">
<label for="inputKey" class="col-md-2 control-label">First Name</label>
<div class="col-md-4">
<input type="text" class="form-control" id="inputKey" placeholder="First Name">
</div>
<label for="inputValue" class="col-md-3 control-label">Email Address</label>
<div class="col-md-4">
<input type="text" class="form-control" id="inputValue" placeholder="Email Address">
</div>
</div>
</div>
</form>
You just need to make sure you're using the correct rows/cols, and don't use form-horizonal along with the grid columns.
<form class="row">
<div class="col-md-6">
<h4>Shipping Address</h4>
<hr>
</div>
<div class="col-md-6">
<h4>Contact Info</h4>
<hr>
</div>
<div class="col-md-12">
<div class="form-group row">
<label for="inputKey" class="col-md-2 control-label">Key</label>
<div class="col-md-4">
<input type="text" class="form-control" id="inputKey" placeholder="Key">
</div>
<label for="inputValue" class="col-md-2 control-label">Other</label>
<div class="col-md-4">
<input type="text" class="form-control" id="inputValue" placeholder="Value">
</div>
</div>
<div class="form-group row">
<label for="inputKey" class="col-md-2 control-label">State</label>
<div class="col-md-2">
<input type="text" class="form-control" id="inputSt" placeholder="ST">
</div>
<div class="col-md-2">
<input type="text" class="form-control" id="inputZip" placeholder="Zip">
</div>
<label for="inputValue" class="col-md-2 control-label">Other</label>
<div class="col-md-4">
<input type="text" class="form-control" id="inputValue" placeholder="Value">
</div>
</div>
</div>
</form>
http://www.codeply.com/go/e92EivkCaq
On the click of Print button windows.print() function gets called and a print of the form is taken.But in the print every form field gets allocated a entire separate row.I wanted the form fields to be arranged in the same order as they are arranged in the form.
For Ex:Father's Occupation,Education,Income fields are in one single row but in the print they are assigned separate rows.
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="form2.css">
</head>
<body>
<div class="container box-container">
<h1 align="center">Admission Form</h1>
<h3 align="center">(2016/2017)</h3>
<br/>
<form class="form-inline" id="sunrise" name="sunrise" method="post" action="">
<div class="row">
<div class="col-md-8 col-sm-12 col-md-offset-4">
<div class="form-group upload"> <label>Upload Child's Image:</label>
<input name="fileUpload" type="file" id="fileUpload" /><br />
<div name="image-holder" id="image-holder"> </div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Scholar No:</label>
<input type="text" class="form-control" name="scholar" placeholder="Scholar No:" disabled>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>Class:</label>
<input type="text" class="form-control" name="class" placeholder="Class">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Date:</label>
<input name="date" id="date" name="date" class="form-control" placeholder="Date" disabled>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>Name:</label></div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <input type="text" class="form-control box-size" name="name" placeholder="Name"></div></div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>Father's Name:</label></div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <input type="text" class="form-control box-size" name="father" placeholder="Father's Name"></div></div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>Mother's Name:</label></div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <input type="text" class="form-control box-size" name="mother" placeholder="Mother's Name"></div></div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>DOB:</label></div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <input type="date" class="form-control box-size" name="dob" placeholder="Date of Birth">
</div></div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>Gender:</label></div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <select class="form-control" name="gender">
<option>Male</option>
<option>Female</option>
</select>
</div></div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2">
<label>Category:</label>
</div>
<div class="col-md-10 col-sm-10">
<div class="col-md-6">
<div class="checkbox">
<label><input type="checkbox" value="gen">Gen</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="obc">Obc</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="st">ST</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="sc">SC</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="sbc">SBC</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="bpl">BPL</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="other">OTHER</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Cast:</label>
<input type="text" class="form-control" name="cast" placeholder="Cast">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>Aadhar Card No:</label>
<input type="text" class="form-control" name="aadhar" placeholder="Aadhar Card No">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Religion:</label>
<input type="text" class="form-control" name="religion" placeholder="Religion">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Present Address:</label>
<input type="text" class="form-control" name="present" placeholder="Present Address">
</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="form-group" >
<label>Pin Code:</label>
<input type="text" class="form-control" name="pin" placeholder="Pin Code">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Permanent Address:</label>
<input type="text" class="form-control" name="permanent" placeholder="Permanent Address">
</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="form-group" >
<label>Pin Code:</label>
<input type="text" class="form-control" name="pincode" placeholder="Pin Code">
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Mobile No 1:
</label>
<input type="text" class="form-control" name="mobile" placeholder="Mobile Number 1">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>2:</label>
<input type="text" class="form-control" name="mobile2" placeholder="Mobile Number 2">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>3:</label>
<input type="text" class="form-control" name="mobile3" placeholder="Mobile Number 3">
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Occuption</label>
<input type="text" class="form-control" name="fatherjob" placeholder="Father's Occuption">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>Education:</label>
<input type="text" class="form-control" name="fatheredu" placeholder="Education">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Income:</label>
<input type="text" class="form-control" name="fatherincome" placeholder="Income">
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Occuption</label>
<input type="text" class="form-control" name="motherjob" placeholder="Mother's Occuption">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>Education:</label>
<input type="text" class="form-control" name="motheredu" placeholder="Education">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Income:</label>
<input type="text" class="form-control" name="motherincome" placeholder="Mother Income">
</div>
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2"> <label>Last School Name:</label>
</div>
<div class="col-md-10 col-sm-10"><div class="col-md-6 col-sm-6"> <input type="text" class="form-control box-size" name="lastschool" placeholder="Last School Name">
</div></div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Passed Class:</label>
<input type="text" class="form-control" name="classpassed" placeholder="Passed Class">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group" >
<label>Obtained Marks:</label>
<input type="text" class="form-control" name="marksobtained" placeholder="Obtained Marks">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Percentage:</label>
<input type="text" class="form-control" name="percentage" placeholder="Percentage">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Hosteler/Day Scholar:</label>
<select class="form-control" name="hostelornot">
<option>Day Scholar</option>
<option>Hosteler</option>
</select> </div>
</div>
<div class="col-md-6 col-sm-6">
<div class="form-group" >
<label>
Bus Facility:</label>
<input type="text" class="form-control" name="bus" placeholder="Bus Facility">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Physical Disability:</label>
<select class="form-control" name="disability">
<option>NO</option>
<option>YES</option>
</select> </div>
</div>
<div class="col-md-6 col-sm-6">
<div class="form-group" >
<label>Any allergical disease:</label>
<input type="text" class="form-control" name="disease" placeholder="Any allergical disease">
</div>
</div>
</div>
<h2 align="center">Declaration By Parent</h2>
<div class="">
<div class="checkbox">
<label><input type="checkbox" value="done" required /></label>We have read the prospectus of Sunrise International Public School and undertake to abide by all the rules as laid down in the school prospectus, we also agree to abide by any amendment to these rules, which may be incorporated from time to time.
</div>
</div>
<br/>
<br/>
<div class="row signature">
<div class="">
<label>Candidate's Signature:</label>
</div>
<div class="">
<label>Parent's Signature:</label>
</div>
<div class="">
<label>Principal's Signature:</label>
</div>
</div>
<br/>
<br/>
<button type="button" class="btn btn-default" id="print" onclick="window.print()">Print Application</button>
<button type="submit" class="btn btn-default" name="submit" value="submit">Submit</button>
</form>
</div>
<script>
$("#fileUpload").on('change', function () {
if (typeof (FileReader) != "undefined") {
var image_holder = $("#image-holder");
image_holder.empty();
var reader = new FileReader();
reader.onload = function (e) {
$("<img />", {
"src": e.target.result,
"class": "thumb-image"
}).appendTo(image_holder);
}
image_holder.show();
reader.readAsDataURL($(this)[0].files[0]);
} else {
alert("This browser does not support FileReader.");
}
});
</script>
<script type="text/javascript">
document.getElementById('date').value = Date();
</script>
</body>
</html>
I don't think I quite understand how bootstrap works with the grid. I want the name and actual field to match up unless the screen size is xs so every field is its own row. For each row, I want the text boxes always aligned.
Here's what I've tried.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container" style="width:80vw">
<form role="form">
<div class="row top-buffer">
<div class="col-sm-4 ">
<div class="form-group">
<label for="inputLabel3" class="col-sm-3 control-label">Date:</label>
<div class="col-sm-8">
<input type="date" class="form-control" id="inputLabel3" placeholder="date">
</div>
</div>
</div>
<div class="col-sm-4 ">
<div class="form-group">
<label for="inputname" class="col-sm-4 control-label">Name:</label>
<div class="col-sm-8 ">
<input type="text" class="form-control" id="name" placeholder="name">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputPassword" class="col-sm-3 control-label">Initials:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="inputInitials" placeholder="Initials">
</div>
</div>
</div>
</div>
<div class="row top-buffer">
<div class="col-sm-12">
<div class="form-group">
<label for="inputLabel3" class="col-sm-1 control-label">Title:</label>
<div class="col-sm-10 ">
<input type="text" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
</div>
<div class="row top-buffer">
<div class="col-sm-5">
<div class="form-group">
<label for="inputLabel3" class="col-sm-2 control-label">Expected:</label>
<div class="col-sm-10 ">
<input type="number" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label for="Actual" class="col-sm-2 control-label">Actual:</label>
<div class="col-sm-10 ">
<input type="number" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
</div>
</div>
<div class="row top-buffer">
<div class="col-sm-12">
<div class="form-group">
<label for="inputLabel3" class="col-sm-1 control-label">Description:</label>
<div class="col-sm-10 ">
<textarea id="descript" class="col-sm-10 "></textarea>
</div>
</div>
</div>
</div>
</div>
<!-- end container -->
</div
Bonus points for someone who can also help me make the description field larger - enough height for at least 20 new lines.
this includes the extra 20 spaces in despcription
Add this to your .css
.col-sm-4 {
display: inline-block;
vertical-align: middle;
float: none;
}
<div class="container" style="width:80vw">
<form role="form">
<div class="row top-buffer">
<div class="col-sm-4 ">
<div class="form-group">
<label for="inputLabel3" class="col-sm-3 control-label">Date:</label>
<div class="col-sm-8">
<input type="date" class="form-control" id="inputLabel3" placeholder="date">
</div>
</div>
</div>
<div class="col-sm-4 ">
<div class="form-group">
<label for="inputname" class="col-sm-4 control-label">Name:</label>
<div class="col-sm-8 ">
<input type="text" class="form-control" id="name" placeholder="name">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputPassword" class="col-sm-3 control-label">Initials:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="inputInitials" placeholder="Initials">
</div>
</div>
</div>
</div>
<div class = "row top-buffer">
<div class="col-sm-12">
<div class="form-group">
<label for="inputLabel3" class="col-sm-1 control-label">Title:</label>
<div class="col-sm-10 ">
<input type="text" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
</div>
<div class = "row top-buffer">
<div class="col-sm-5">
<div class="form-group">
<label for="inputLabel3" class="col-sm-2 control-label">Expected:</label>
<div class="col-sm-10 ">
<input type="number" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label for="Actual" class="col-sm-2 control-label">Actual:</label>
<div class="col-sm-10 ">
<input type="number" class="form-control" id="inputLabel3" placeholder="title">
</div>
</div>
</div>
</div>
</div>
<div class = "row top-buffer">
<div class="col-sm-12">
<div class="form-group">
<label for="inputLabel3" class="col-sm-1 control-label">Description:</label>
<div class="col-sm-10 ">
<textarea id="descript" class="col-sm-10" rows="20"></textarea>
</div>
</div>
</div>
</div>
</div>
<!-- end container -->
</div