Div next to each other with bootstrap spacing

Asked

Viewed 4,618 times

0

Colleagues.

I’m trying to create this layout: inserir a descrição da imagem aqui

With the code below, but I’m not getting it. Can someone help me?

<div class="col-xs-4" style="background-color: #F47B36; color: #FFF ">
<div style="padding: 10px">
<div class="col-xs-6"> teste </div>
<div class="col-xs-6"> <i class="fa fa-users fa-f5" aria-hidden="true"></i> </div>
</div>
</div>

<div class="col-xs-4" style="background-color: #F47B36; color: #FFF; margin-left: 10px ">
<div style="padding: 10px">
<div class="col-xs-6"> teste </div>
<div class="col-xs-6"> <i class="fa fa-users fa-f5" aria-hidden="true"></i> </div>
</div>
</div>

<div class="col-xs-4" style="background-color: #F47B36; color: #FFF; margin-left: 10px ">
<div style="padding: 10px">
<div class="col-xs-6"> teste </div>
<div class="col-xs-6"> <i class="fa fa-users fa-f5" aria-hidden="true"></i> </div>
</div>
</div>

1 answer

1


In this case you can use offset:

<div class="col-xs-8 col-xs-offset-2">
    <div class="col-xs-2" style="background-color: #F47B36; padding: 30px 10px;"></div>
    <div class="col-xs-2 col-xs-offset-1" style="background-color: #F47B36; padding: 30px 10px;"></div>
    <div class="col-xs-2 col-xs-offset-1" style="background-color: #F47B36; padding: 30px 10px;"></div>
    <div class="col-xs-2 col-xs-offset-1" style="background-color: #F47B36;padding: 30px 10px;"></div>
</div>
  • Perfect Gabriel. Thank you very much.

  • Not at all, bro!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.