How to make the pseudo-element before it works?

1

I have the pseudo-element before but I did everything and I can not make it work. The image does not appear at all.

section.conteudopadrao a:before{
content: url("./anuncie/pdf.png");
}

There are several days I'm in the search of this operation and nothing works with before .

    
asked by anonymous 14.07.2017 / 14:52

1 answer

3

This works for me here

section.conteudopadrao a:before{
    content: url("http://www.bestadsontv.com/images/facebook.gif");
}

So the solution proposed by Bruno above should work

section.conteudopadrao a:before{
    content: url("./anuncie/pdf.png");
}

If it does not work, try:

section.conteudopadrao a:before{
    content: url("/anuncie/pdf.png");
}

If you continue to have problems, make sure the image path is correct.

EDIT

According to information on how your folder structure is, the correct one is to use the code below in your CSS . ;)

section.conteudopadrao a:before{
    content: url("../anuncie/pdf.png");
}
    
14.07.2017 / 15:11