JSFiddle - React, Tailwind, and code Playground
HTML
<form class="form-style-9">
<h2>Personal details</h2>
<ul>
<div id="personal-details">
<li>
<div class="test">
<label for="Rank">Rank</label>
<input id="Rank" type="text" name="Rank" class="field-style field-split25 align-left" placeholder="Rank" />
</div>
<div class="test">
<label for="RankApplied">Rank Applied</label>
<input id="RankApplied" type="text" name="RankApplied" class="field-style field-split25 align-left" placeholder="Rank Applied" />
</div>
<div class="test">
<label for="Vesselstype">Vessel's type</label>
<input id="Vesselstype" type="text" name="Vesselstype" class="field-style field-split25 align-left" placeholder="Vessel's type" />
</div>
<div class="test">
<label for="datepicker2">Date Applied</label>
<input id="datepicker2" type="date" name="datepicker2" class="field-style field-split25-4 align-left" placeholder="Date Applied" />
</div>
</li>
<li>
<div class="test">
<label for="fname">First Name</label>
<input id="fname" type="text" name="fname" class="field-style field-split25 align-left" placeholder="First Name" />
</div>
<div class="test">
<label for="nationality">Nationality</label>
<input id="nationality" type="text" name="nationality" class="field-style field-split25 align-left" placeholder="Nationality" />
</div>
<div class="test">
<label for="height">Height</label>
<input id="height" type="text" name="height" class="field-style field-split25 align-left" placeholder="Height" />
</div>
<div class="test">
<label for="na">Nearest airport</label>
<input id="na" type="text" name="na" class="field-style field-split25-4 align-left" placeholder="Nearest airport" />
</div>
</li>
<li>
<div class="test">
<label for="sname">Surename</label>
<input id="sname" type="text" name="sname" class="field-style field-split25 align-left" placeholder="Surename" />
</div>
<div class="test">
<label for="noc">No. of children</label>
<input id="noc" type="number" name="noc"...
CSS
<style type="text/css">
.form-style-9{
max-width: 450px;
background: #FAFAFA;
padding: 30px;
margin: 50px auto;
box-shadow: 1px 1px 25px rgba(0, 0, 0, 0.35);
border-radius: 10px;
border: 6px solid #305A72;
}
.form-style-9 ul{
padding:0;
margin:0;
list-style:none;
}
.form-style-9 ul li{
display: block;
margin-bottom: 1.25%;
min-height: 58px;
}
.form-style-9 ul li .field-style{
box-sizing: border-box;
padding: 8px;
outline: none;
border: 1px solid #B0CFE0;
}
.form-style-9 ul li .field-style:focus{
box-shadow: 0 0 5px #B0CFE0;
border:1px solid #B0CFE0;
}
.form-style-9 ul li .field-split{
width: 49%;
}
.form-style-9 ul li .field-split25{
/* float: left;
width: 24%;
margin-right: 1.25%;*/
height: 40px;
}
.form-style-9 ul li .field-split25-4{
/*float: left;
width: 24%;
margin-right: 0;*/
height: 40px;
}
.form-style-9 ul li .field-full{
width: 100%;
}
.form-style-9 ul li input.align-left{
/*float:left;*/
}
.form-style-9 ul li input.align-right{
float:right;
}
.form-style-9 ul li textarea{
width: 100%;
height: 100px;
}
.form-style-9 ul li input[type="button"],
.form-style-9 ul li input[type="submit"] {
box-shadow: inset 0px 1px 0px 0px #3985B1;
background-color: #216288;
border: 1px solid #17445E;
display: inline-block;
cursor: pointer;
color: #FFFFFF;
padding: 8px 18px;
text-decoration: none;
font: 12px Arial, Helvetica, sans-serif;
}
.form-style-9 ul li input[type="button"]:hover,
.form-style-9 ul li input[type="submit"]:hover {
background: linear-gradient(to bottom, #2D77A2 5%, #337DA8 100%);
background-color: #28739E;
}
.formcol{
float: left;
padding: 2px;
}
.formcol label {
font-weight: bold;
display:block;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
}
.test {
float:left;
width: 23%;
margin-right: 1.25%;
margin-bottom: 1.25%;
}
.image-div {
margin-right:...