I'm facing an issue with the layout of a table and an image on mobile devices. On PC, they display correctly side by side but on mobile, the image overlaps the table or remains next to it. I built the table using Bootstrap 4 as a requirement. I attempted fixing the position of the table which resulted in the image overlaying the table. Removing the fix caused them to stay on the same row requiring horizontal scrolling.
HTML:
<div id="bottom_row" class="container-fluid text-white pt-5 position-absolute">
<h2 class="font-weight-bold">TABLE DATA</h2>
<table class="table text-white font-weight-bold w-50" id="table">
<tbody>
<tr>
<td class="border-top border-info border-3" scope="">COURSE</td>
<td class="border-top border-info border-3">38.40</td>
<td class="border-top border-info border-3">DATE</td>
<td class="border-top border-info border-3">38.40</td>
</tr>
<tr>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
</tr>
<tr>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
</tr>
<tr>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
</tr>
<tr>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
</tr>
<tr>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
<td class="border-top border-info">LOREM IPSUM</td>
<td class="border-top border-info">XX.XX</td>
</tr>
<tr>
<td class="border-top border-bottom border-info">LOREM IPSUM</td>
<td class="border-top border-bottom border-info">XX.XX</td>
<td class="border-top border-bottom border-info">LOREM IPSUM</td>
<td class="border-top border-bottom border-info">XX.XX</td>
</tr>
</tbody>
</table>
</div>
<div id="graph" class="">
<img id="graph_img" src="graph.png" class="">
</div>
CSS:
body{
font-family: Helvetica, sans-serif;
background-color: rgb(38, 68, 105);
}
#top_row h3{
color: rgb(71, 147, 176);
float: left;
}
#top_row h2{
padding-left: 20%;
float: center;
}
#top_row h5{
float: right;
}
#top_row{
clear: both;
}
}
#bottom_row{
clear: both;
}
#graph_img{
padding-left: 55%;
height: 400px;
}
#graph{
padding-top: 80px;
}
table{
font-size: 18px;
margin: 0;
}
img{
width: 100%;
}
.border-3{
border-width:3px !important;
}