Bootstrap includes 4 levels of grids, each with their own class prefixes;
.col-xs- , (<768px)
.col-sm- , (≥768px)
.col-md- , (≥992px)
.col-lg- , (≥1200px)
If you use a column class of "col-xs-6", it means that from 0px to 767px the column will be half of the container's width. Without adding another class for larger screens, it will remain at 50% on wider screens as well, going beyond the initial range unless specified otherwise.
The issue arises when most mobile devices are too narrow to display two columns effectively. In this case, it's recommended to change from "col-xs-6"
to "col-xs-12"
, and also include "col-sm-6".
<div class="col-xs-12 col-sm-6">
Now, from 768px onwards, the columns will both occupy 50% of the available space.
If your layout appears broken, it could be due to input elements having a width or min-width that exceeds the 50% column grid they are placed in.