+ 1

Code doesn't work with p::before { content: url("logo.jpg"); }

why content used as keyword ? why not use background:url()

3rd Oct 2017, 7:51 AM
Pooja
Pooja - avatar
3 Respostas
0
{ display:block; content: ' '; background: url('logo.jpg'); height: 50px; width: 50px; }
3rd Oct 2017, 8:49 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
Thanks Yaroslav Pieskov. it worked with display : inline-block
3rd Oct 2017, 12:56 PM
Pooja
Pooja - avatar
0
yeah, you can use inline-block too
3rd Oct 2017, 3:49 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar