How to remove the spacing generated by tag a?

0

When I insert the a tag to link img , it generates a space at the bottom of the images. See the image below!

Although the space is small, it is quite annoying not to know how to solve:

Ineedthelinknottogeneratethisspacing.

HTML

<sectionclass="compartilhar">

<figure>
    <a href="https://www.facebook.com/sharer/sharer.php?u=http://www.guaraparivirtual.com.br" title="Compartilhar no Facebook">
    <img src="./imagens/compartilhar-face.png">
    </a>
</figure>

<figure>
    <a href="https://twitter.com/intent/tweet?url=http://www.guaraparivirtual.com.br&text=Guarapari%20Virtual" title="Compartilhar no Twitter">
    <img src="./imagens/compartilhar-gplus.png">
    </a>
</figure>

<figure>
    <a href="https://plus.google.com/share?url=http://www.guaraparivirtual.com.br" title="Compartilhar no Goole Plus">
    <img src="./imagens/compartilhar-twitter.png">
    </a>
</figure>

<figure>
    <a href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.guaraparivirtual.com.br&title=Guarapari%20Virtual" title="Compartilhar no LinkEdin">
    <img src="./imagens/compartilhar-linkedin.png">
    </a>
</figure>

<figure>
    <a href="https://www.facebook.com/sharer/sharer.php?u=http://www.guaraparivirtual.com.br" title="Compartilhar no Tumblr">
    <img src="./imagens/compartilhar-tumblr.png">
    </a>
</figure>

<figure>
    <a href="https://www.facebook.com/sharer/sharer.php?u=http://www.guaraparivirtual.com.br" title="Compartilhar no Pinterest">
    <img src="./imagens/compartilhar-pinterest.png">
    </a>
</figure>

</section>

CSS

section.compartilhar{
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 2px;
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;
  background-color: #D6E6F0;
}

section.compartilhar figure{
  width: 16.66666666666667%;
}

section.compartilhar figure img{
  max-height: 40px;
  margin-left: 50%;
  padding: 5px;
  box-sizing: border-box;
}
    
asked by anonymous 20.07.2017 / 19:14

2 answers

0

Try to add a class with margin and padding to zero. Maybe using an ! .

link

    
20.07.2017 / 19:37
0

Both the a and the img tags are, by default, "in line" elements, that is, they get display: inline , so they receive a line height as if it were a plain text. >

A solution can be set to two line-height: 0 , but the best overall solution is to use display: block or display: inline-block .

    
21.07.2017 / 15:36