My webpage has two columns, each containing an SVG and some text. However, when I resize the window in Google Chrome, the text drops below the SVG before the window width goes below 600px. How can I prevent this from happening while maintaining a constant margin between both columns and the sides of the browser?
HTML:
<div class="containerx">
<div class="rowx">
<div class="colx">
<svg class="boxicon" version="1.1" viewBox="0.0 0.0 616.4015748031496 615.514435695538" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>
<h2 class="textthing">Fast Shipping</h2>
</div>
<div class="colx">
<svg class="boxicon" version="1.1" viewBox="0.0 0.0 616.4015748031496 615.514435695538" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>
<h2 class="textthing">Fast Shipping</h2>
</div>
</div>
</div>
CSS:
.boxicon {
height: 150px;
float: left;
margin: 5px;
}
.textthing {
float: left;
text-align: center;
padding-top: 48px;
margin-left: 20px;
}
.containerx {
}
.rowx {
width: 95%;
}
.colx {
width: 45%;
float: left;
background-color: #000;
margin-left: 5%
}
@media screen and (max-width: 600px) {
.colx {
width: 100%;
margin-bottom: 5px;
}
}
Full Code: pastebin
Desired Layout: https://i.sstatic.net/YkmVC.png
Current Output: https://i.sstatic.net/OuXy2.png