Well, from what I understand the question, what you’re trying to do here is create share buttons for the social networks mentioned in the question, and that these adjust to 100%
of the total size of div pai
in order to fully occupy the same.
If that’s it, you can do it this way: http://jsfiddle.net/Lhuh8jxx/
(Increase or decrease the jsFiddle result window to see code in action)
<ul id="linksPartilha">
<li class="redeSocial facebookShare"><a href="#">Facebook</a></li>
<li class="redeSocial twitterShare"><a href="#">Twitter</a></li>
<li class="redeSocial pinterestShare"><a href="#">Pinterest</a></li>
<li class="redeSocial whatsAppShare whatsApp"><a href="#">WhatsApp</a></li>
</ul>
#linksPartilha {
list-style-type: none;
margin: 0;
padding: 0;
width: 100%;
display: table; /* Transforma a div numa tabela */
table-layout: fixed; /* Utiliza o algoritmo de uma table fixed */
border-collapse: separate; /* Colapsa a tabela para poder adicionar o espaçamento */
border-spacing: 5px 0px; /* Adiciona o espaçamento */
}
/* Cria uma lista horizontal com espaçamento */
.redeSocial {
display: table-cell;
background: #2f3036;
}
/* Estilo para os links dos botões */
.redeSocial a {
display:block;
height: 50px;
line-height: 50px;
text-align: center;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
text-decoration: none;
}
/* Cor para cada botão */
.facebookShare {background-color:#3E5A97;}
.twitterShare {background-color:#2EA7DE;}
.pinterestShare {background-color:#C3292D;}
.whatsAppShare {background-color:#5BBE4A;}
@media (min-width: 600px) {
.whatsApp {
display: none;
}
}
You can read more about the table-layout: fixed;
here at this link: CSS table-layout Property
If possible, post the code to jsfiddle.net so we can see how the LI positioning is going.
– Marcelo Formentão