0
Hello I’m trying to make a header in HTML + CSS for learning, and I’m not understanding why it’s not working, follow below the code:
footer {
background-image: url(../img/fundo-rodape.png);
background-color: #333;
clear: both;
padding: 20px 0;
height: 100px;
}
footer img {
margin-top: 25px;
}
footer.container {
position: relative;
}
.social {
position: absolute;
top: 12px;
right: 0;
}
.social li {
height: 32px;
width: 32px;
display: block;
text-indent: -9999px;
}
.social a [href*="facebook.com"] {
background-image: url(../img/facebook.png);
}
.social a [href*="twitter.com"] {
background-image: url(../img/twitter.png);
}
.social a [href*="plus.google.com"] {
background-image: url(../img/googleplus.png);
}
.social li {
float: left;
margin-left: 25px;
}
<footer>
<!--rodapé-->
<div class="container"><img src="../img/logo-rodape.png" alt="Logo da Mirror Fashion">
<ul class="social">
<li class="social-google"><a href="http://facebook.com/mirrorfashion">Facebook</a></li>
<li><a href="http://twitter.com/mirrorfashion">Twitter</a></li>
<li><a href="http://plus.google.com/mirrorfashion">Google+</a></li>
</ul>
</div>
</footer>
As you can see, there are no social media icons Help me please.
Check that the image directory is correct, and also assign a background-size to the items, maybe the images exceed the size of the elements and do not appear, try to center the background-image also using the background-position, and try not to use the href property as a selector in css, assign a class or something like...
– Lucas Souza
Is there an error in the Chrome devtools console? Is the file extension correct? Eh png itself or svg for example?
– hugocsl
Hugo, I am using firefox, does not present any error in the console, and yes, I am using png images.
– Gelson Lopes do Nascimento