Consider utilizing flex for a smoother and more suitable solution in this scenario.
Your component JSX:
<div className='form-container'>
<div className='employee-id'>
<label htmlFor='ID'>EMPLOYEE #</label>
<input className="form-control w-25" id="ID" readOnly></input>
</div>
<form className='employee-details' data-transport-order="form">
<div className="form-group">
<label htmlFor='ID'>Invoice No.</label>
<input className="form-control" id="ID" readOnly></input>
<label htmlFor="TransportDate">Date</label>
<input type="date" className="form-control w-25" id="TransportDate" autoFocus required></input>
</div>
</form>
</div>
Styles:
.form-container{
display: flex;
flex-direction: row;
}
.employee-id{
display: flex;
flex-direction: column;
border-right: 6px solid green;
margin-right: 10px;
padding-right: 10px;
}
.employee-details .form-group{
display: flex;
flex-direction: column;
}
Result
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.form-container {
display: flex;
flex-direction: row;
}
.employee-id {
display: flex;
flex-direction: column;
border-right: 6px solid green;
margin-right: 10px;
padding-right: 10px;
}
.employee-details .form-group {
display: flex;
flex-direction: column;
}
</style>
</head>
<body>
<div id="root">
<div class="App">
<div class="form-container">
<div class="employee-id"><label for="ID">EMPLOYEE #</label><input class="form-control w-25" id="ID" readonly=""></div>
<form class="employee-details" data-transport-order="form">
<div class="form-group"><label for="ID">Invoice No.</label><input class="form-control" id="ID" readonly=""><label for="TransportDate">Date</label><input type="date" class="form-control w-25" id="TransportDate" required=""></div>
</form>
</div>
</div>
</div>
</body>
</html>