Matilde Ramos
Matilde Ramos

Reputation: 3

Div with images centered on mobile but not in desktop mode using bootstrap 4

I have this DIV with social media buttons:

<div class="redes-sociales col-sm-pull-6 col-md-6 col-lg-push-4 float-right py-2">
                <img class="img-rounded img-social" alt="fb" src="img/fb.png">
                <img class="img-rounded img-social" alt="ig" src="img/ig.png">
                <img class="img-rounded img-social" alt="tt" src="img/tt.png">
            </div>

That looks like this:

social media bar

What I need is that when the page is in mobile mode, the icons appears centered in the middle:

mobile mode

What I need to change to achieve this? Thanks!

Upvotes: 0

Views: 42

Answers (1)

Aditya Jangid
Aditya Jangid

Reputation: 104

try adding this to your css

@media screen and (max-width:768px){
    .redes-sociales{
        float: none;
        margin: 2px auto;
    }
}

Upvotes: 1

Related Questions