Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

col-xs-0 Not Working Bootstrap

When I emulate my mobile settings for my site, the social icons should be gone; however, they stay. I have tried putting col-xs-0 in the i frames themselves, and nothing.

Here's the picture: enter image description here

Here's my footer HTML.

<footer>
    <div class="container-fluid">
            <div class="row">
                <div class="col-xs-0 col-md-2 pull-right footersocial">
                    <a href="#" target="_blank"><i class="fa fa-facebook-official fa-3x socialicons"  aria-hidden="true"></i></a>
                    <a href="#" target="_blank"><i class="fa fa-twitter fa-3x socialicons" aria-hidden="true"></i></a>
                    <a href="#" target="_blank"><i class="fa fa-instagram fa-3x socialicons" aria-hidden="true"></i></a>
                </div>
            </div>
        <div class="row" style="margin-left: 15px; margin-top: 15px;">
            <div class="col-md-2 text-center">
                <p>Privacy Policy</p>
            </div>
            <div class="col-md-2 text-center">
                <p>Terms of Service</p>
            </div>
            <div class="col-md-2 text-center">
                <p>Acceptable Use Policy</p>
            </div>
            <div class="col-md-2 text-center">
                <p>Warranty & Returns Policy</p>
            </div>
            <div class="col-md-2 text-center">
                <p>Third Party Copyright Notices</p>
            </div>
            <div class="col-md-2 text-center">
                <p>Terms of Service for Phone</p>
            </div>
        </div>
    </div>
</footer>

My CSS:

.socialicons {
    color: white;
    margin-right: 10px;
    margin-top: 10px;
    margin: 0 auto;
    display: block;
}
.footersocial {
  margin: 0 auto;
  display: block;
}
.col-xs-0 {
    display: none;
}
like image 773
Thomas Hutton Avatar asked Dec 29 '16 23:12

Thomas Hutton


People also ask

What is Col Xs in Bootstrap?

In short, they are used to define at which screen size that class should apply: xs = extra small screens (mobile phones) sm = small screens (tablets) md = medium screens (some desktops) lg = large screens (remaining desktops)

Is there Xs in Bootstrap?

Mixed: Mobile And Desktop. The Bootstrap grid system has four classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). The classes can be combined to create more dynamic and flexible layouts. Tip: Each class scales up, so if you wish to set the same widths for xs and sm, you only need to specify xs.

What is XS size in Bootstrap?

The Bootstrap grid system has four classes: xs (for phones - screens less than 768px wide) sm (for tablets - screens equal to or greater than 768px wide) md (for small laptops - screens equal to or greater than 992px wide)

How do I center COL in Bootstrap?

Use d-flex justify-content-center on your column div. This will center everything inside that column. If you have text and image inside the column, you need to use d-flex justify-content-center and text-center .


3 Answers

You should use hidden-xs to hide the block in the mobile view or xs (extra small) views:

<div class="hidden-xs col-md-2 pull-right footersocial">
like image 97
Praveen Kumar Purushothaman Avatar answered Oct 20 '22 21:10

Praveen Kumar Purushothaman


In Bootstrap 4 you can use:

.d-none .d-{screen size}-block

to hide an element depending on the size of the screen (xs, sm, md etc)

Documentation : here

like image 29
RoRFan Avatar answered Oct 20 '22 21:10

RoRFan


I just did:

.col-xs-0, 
.col-sm-0,
.col-md-0,
.col-lg-0 {
  flex: 0 0 0;
  max-width: 0;
}

As my goal was to make sliding animation "from nowhere" and it worked fine for me!

like image 32
JuliaCrush Avatar answered Oct 20 '22 22:10

JuliaCrush