"Extend form field beyond parent"
Bootstrap 4.1.1 Snippet by mkrl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<form class="form-compact" action="">
<div class="row paddingBottom20">
<div class="container col-4">
<div class="row">
<h6 class="text-center col-12 mb-0">Contact Information</h6>
<sub class="text-right text-muted col-12"><a href="#" tabindex="-1"><i class="far fa-edit"></i></a></sub>
</div>
<div class="dropdown-divider mb-3"></div>
<div class="form-group row">
<label for="firstName" class="col-4 col-form-label-sm text-right">First Name:</label>
<div class="col-8">
<div class="input-group">
<input id="firstName" name="text" type="text" class="form-control form-control-sm" readonly>
</div>
</div>
</div>
<div class="form-group row align-items-center">
<label for="lastName" class="col-4 col-form-label-sm text-right">Last Name:</label>
<div class="col-8">
<div class="input-group">
<input id="lastName" name="text" type="text" class="form-control form-control-sm" readonly>
</div>
</div>
</div>
<div class="form-group row align-items-center">
<label for="position" class="col-4 col-form-label-sm text-right">Position:</label>
<div class="col-8">
<div class="input-group">
<select id="position" class="form-control" disabled>
<option></option>
<option>Shift Supervisor</option>
<option>Airport Manager</option>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
.extendable:focus {
position: absolute;
width: 110%;
top: -1rem;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: