Answer the question
In order to leave comments, you need to log in
How to overlay an image using css without changing html?
How to overlay another image on top of facebook.svg using css without changing this code? Haven't succeeded yet...
<ul id="id1">
<li id="id-facebook">
<a href="https://www.facebook.com/foo">
<img src="https://example.com/images/facebook.svg" width="18" height="18" alt="Facebook">
</a>
</li>
</ul>
Answer the question
In order to leave comments, you need to log in
Something like this:
#id-facebook a {
position: relative;
z-index: 1;
}
#id-facebook a:after {
content: '';
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
background-image: url(...);
background-size: cover;
z-index: 2;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question