Here is the current layout of the page:
https://i.sstatic.net/KuHiT.png
However, when resizing to a mobile screen, the flex boxes overflow the container:
https://i.sstatic.net/kI3ee.png
Html:
<div id="bars" class="d-flex flex-row text-white text-center">
<div class="port-item p-4 bg-primary" data-toggle="collapse" data-target="#home">
<i class="fa fa-home d-block"></i> Home
</div>
<div class="port-item p-4 bg-success" data-toggle="collapse" data-target="#resume">
<i class="fa fa-graduation-cap d-block"></i> Resume
</div>
<div class="port-item p-4 bg-warning" data-toggle="collapse" data-target="#work">
<i class="fa fa-folder-open d-block"></i> Work
</div>
<div class="port-item p-4 bg-danger" data-toggle="collapse" data-target="#contact">
<i class="fa fa-envelope d-block"></i> Contact
</div>
</div>
I have attempted to fix this with CSS media queries, but so far nothing has changed:
.port-item {
width: 30%;
}
@media(min-width: 768px) {
#bars {
flex-direction: column;
}
}
Any suggestions on how to make them fit within the container or display in a column format?