When I write to div, it leaves the place

0

#meio {

  width: 100%;

  text-align: center;

}

.box {

  margin: 10px 4px;

  margin-bottom: -4px;

  display: inline-block;

}

#box-1 {

  width: 290px;

  height: 300px;

  background-color: white;

}

#box-2 {

  width: 290px;

  height: 300px;

  background-color: white;

}

#box-3 {

  width: 290px;

  height: 300px;

  background-color: white;

}
<div id="meio">

  <div id="box-1" class="box">aaaaa</div>

  <div id="box-2" class="box"></div>

  <div id="box-3" class="box"></div>

</div>
    
asked by anonymous 22.05.2015 / 14:15

1 answer

1

Add a "display: flex" in your id # half. Then you can even remove the "display: inline-block" class .box

#meio {

  width: 100%;

  text-align: center;

  display: flex;
}

.box {

  margin: 10px 4px;

  margin-bottom: -4px;

}
    
22.05.2015 / 14:36