Here is the code snippet I'm working with:
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<style>
.col-lg-3.custom {
flex: 0 0 20%;
max-width: 20%;
}
.col-lg-6.custom {
flex: 0 0 55%;
max-width: 55%;
}
</style>
</head>
<body>
<div class="row">
<div class="col-lg-3 custom" style="background: red;">1</div>
<div class="col-lg-6 custom" style="background: rgb(0, 255, 255);">2</div>
<div class="col-lg-3" style="background: green;">3</div>
</div>
</body>
</html>
I've added custom styles to make the first column a bit smaller because 'col-lg-3' is too wide and 'col-lg-2' is too narrow for my needs. These custom styles work well on larger screens.
https://i.sstatic.net/zkk0G.png
However, when viewed on mobile, the responsiveness is lost and it looks like the image below:
https://i.sstatic.net/SqXNj.png
I would like it to appear as shown in this image on mobile:
https://i.sstatic.net/49suu.png
Please note that I have seen some solutions for similar issues, but they seem to be referring to Bootstrap 3 and haven't worked for me. Any help would be appreciated.