Columns are not adjusting in mobile view or small screen they are moving to next row in bootstrap 4

Viewed 32

when i am inspecting the browser to see columns inside row they are not in a single line columns are moving to another line.

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-lg-2 col-md-2  col-xs-5">
            <div class="brand-logo">
                <img src="logo.png" class="rounded-circle">
            </div>
        </div>

        <div class="col-sm-5 col-lg-7 col-md-7  col-xs-3">
            <div>smmm</div>
        </div>


        <div class="col-sm-4 col-lg-3 col-md-3  col-xs-4 ">
            <div class="right-header d-flex justify-content-end">
                <div class="header-account">
                    <i class="fa fa-user" aria-hidden="true"></i>
                </div>

                <div class="header-cart">
                    <i class="fa fa-shopping-cart" aria-hidden="true"></i>
                </div>
            </div>
        </div>
    </div>

</div>
1 Answers

The mobile prefix in Bootstrap 4 is not .col-xs- but .col-, so you just need to change all of the col-xs-* to col-*:

<div class="col-sm-3 col-lg-2 col-md-2 col-5">
                                          ^^
<div class="col-sm-5 col-lg-7 col-md-7 col-3">
                                          ^^
<div class="col-sm-4 col-lg-3 col-md-3 col-4">
                                          ^^
Related