mardi 4 décembre 2018

Why are children with text displayed differently?

Why the element without text remains at the top unlike the others. In addition to that, depending on the size of the invisible spaces between the elements, they are placed very differently.

.Example {
  display: inline-block;
  font-size: 0px;
}

.Example > * {
  height: 50px;
  width: 50px;
  background: green;
  display: inline-block;
}
<!DOCTYPE html>
<html>
  <head>
  </head>
  
  <body>
    <div class="Example">
      <div>Ex</div>
      <div></div>
      <div>Ex</div>
    </div>
  </body>
</html>



Aucun commentaire:

Enregistrer un commentaire